Hi.
We would like to manage ShutDown situation for our application where we would like to divert all calls to the app to default/shutdown.html page when 'ShutDown' is enabled in .ini file.
For Ex:
in development.ini file
------------------------------------
app.shutdown = True
app.shutdown_msg = 'system is in maintenance'
if this is setup, then start the tg from ShutDownController() instead of RootController()
where as in, my root.py has
'--------------------------------------------
class ShutDown(BaseController):
expose(template="templates.shutdown")
def default(self,*lst, **kw):
msg = config.get('shutdown_msg','system is temporarity shutdown. Sorry for the inconvenience')
return dict(msg = msg)
class RootController(BaseController):
...
...
This was handled during commands.py script in TG1 with Cherrypy.
Is there any way to do the same in TG2? or is there any better way to handle this scenario?
With Regards,
Dinesh.