So I'm working to consolidate severall web2py apps that share ~85% of their code. They each have their own configurations, databases, etc.
Then request.vars.client_name allows me to load client-specific db uris, models_to_run, etc. Now I need a way to do a similar thing with the scheduler. Since the request doesn't go the way http requests do, I can't load the "environment" to look the way for task for CllientA the way it would look for browsing
myurl.com/ClientA.
The only other way I can think to solve this would be to pass all needed data to queue_task and then create new db connections there. But then I run into the issue of the models won't be loaded as expected.
Does anyone have any ideas?