Roundup Tracker - Issues

Message7071

Author rouilj
Recipients cmeerw, rouilj, schlatterbeck, tttech-klonner
Date 2021-02-09.20:48:11
Message-id <20210209204808.875F24C02D3@itserver6.cs.umb.edu>
In-reply-to <1612893294.13.0.394483134398.issue2551112@roundup.psfhosted.org>
Hi Christof:

In message <1612893294.13.0.394483134398.issue2551112@roundup.psfhosted.org>,
Christof Meerwald writes:
>Christof Meerwald added the comment:
>
>I would prefer to have this customizable in some way - the idea behind 
>having a separate get_tracker method was to allow additional 
>customisation (e.g. inherit from RequestDispatcher and override 
>get_tracker or add additional initialisation in the derived class). This 
>hardcoded call from __init__ makes it a lot harder to customise the 
>behaviour (because your overriding get_tracker relies on additional 
>initialization from your __init__).

How would overriding work? If I understand the code flow properly
interfaces.py is loaded after the call to get_tracker. So
interfaces.py can't be used to override get_tracker.

I can only see it being overridden from a wsgi.py wrapper like:

    import sys
    # obtain the WSGI request dispatcher
    from roundup.cgi.wsgi_handler import RequestDispatcher

    tracker_home = '/home/trackers/demo'

    def My_get_tracker(self):
        # do other stuff
        RequestDispatcher.get_tracker(self)

    RequestDispatcher.get_tracker = My_get_tracker

    # runs _init_ with My_get_Tracker right?
    app =  RequestDispatcher(tracker_home)

Did I get something wrong here?
History
Date User Action Args
2021-02-09 20:48:11rouiljsetrecipients: + schlatterbeck, cmeerw, tttech-klonner
2021-02-09 20:48:11rouiljlinkissue2551112 messages
2021-02-09 20:48:11rouiljcreate