Roundup Tracker - Issues

Message7077

Author schlatterbeck
Recipients cmeerw, rouilj, schlatterbeck, tttech-klonner
Date 2021-02-12.09:27:39
Message-id <20210212092737.pcsx5tk5bgkktiko@runtux.com>
In-reply-to <1613084926.41.0.49522541279.issue2551112@roundup.psfhosted.org>
On Thu, Feb 11, 2021 at 11:08:46PM +0000, John Rouillard wrote:
> Ralf do you have feedback here?

John, Christof,
what do you think about factoring out the call to get_tracker into a
preload method, something along the lines of (untested, if you agree
I'll implement this):

class RequestDispatcher(object):
    def __init__(self, home, debug=False, timing=False, lang=None):
    ...

        self.preload()

    def preload(self):
        """ trigger pre-loading of imports and templates """
        with self.get_tracker():
            pass

Then derived classes may easily override the preload method if needed
and we still have preloading the default.

Ralf
-- 
Dr. Ralf Schlatterbeck                  Tel:   +43/2243/26465-16
Open Source Consulting                  www:   www.runtux.com
Reichergasse 131, A-3411 Weidling       email: office@runtux.com
History
Date User Action Args
2021-02-12 09:27:39schlatterbecksetrecipients: + schlatterbeck, rouilj, cmeerw, tttech-klonner
2021-02-12 09:27:39schlatterbecklinkissue2551112 messages
2021-02-12 09:27:39schlatterbeckcreate