[pylons-discuss] Re: Server does not reload/start if `deamon` is running

2021-05-11 Thread C J
I have this problem since last week. Any Idea? Le mercredi 16 février 2011 à 17:00:34 UTC+1, neurino a écrit : > I have a daemon handling some scheduled jobs that can be started / > stopped by my pylons project so it can run even if the server is not > running. > > To daemonize my utilities I

Re: [pylons-discuss] Re: Pyramid maintenance mode

2021-01-11 Thread C J
the 'if not ... or not ...' expressions. While I > > don't see anything in particular wrong with them, there may be a logic > > error buried in the expressions somewhere, and separating them out and > > printing the intermediate values may reveal what it is > > > > On Fri,

Re: [pylons-discuss] Re: Pyramid maintenance mode

2021-01-08 Thread C J
I try to understand why my "or not" have no effect: def maintenance_tween_factory(handler, registry): # Return a tween callable. # 'handler' is the next tween or the WSGI application. # Deployment settings are in 'registry.settings'. def maintenance_tween(request):

Re: [pylons-discuss] Re: Pyramid maintenance mode

2021-01-08 Thread C J
should I do to avoid these issues? Le vendredi 8 janvier 2021 à 14:34:53 UTC+1, C J a écrit : > I get 'No module named 'maintenance_tween'. Should I separate the two > functions in 2 different files, both of them being in the same module? > > Le vendredi 8 janvier 2021 à 13:04:57

Re: [pylons-discuss] Re: Pyramid maintenance mode

2021-01-08 Thread C J
d main configuration > file, using the "includes" section... > The "includeme" function will then be called automatically to register > your tween! > > Thierry > -- > https://www.ulthar.net -- http://pyams.readthedocs.io > > Le ven. 8 janv. 2021 à 12

Re: [pylons-discuss] Re: Pyramid maintenance mode

2021-01-08 Thread C J
ur work or hold off on any critical actions until we are finished." } ) else: # Call next tween/application and return its response unchanged. return handler(request) return maintenance_tween Le vendredi 8 janvier 2021 à 11:36:52 UTC+1, C J a écrit : > To everybody: thanks a lot for your a

Re: [pylons-discuss] Re: Pyramid maintenance mode

2021-01-08 Thread C J
n its response >> unchanged. >> return handler(request) >> >> Then list your module in 'pyramid.includes' in the config file. E.g., >> "myapp.lib.mytween". >> >> That 'if is_maintenance_mode' condition could check whether a specified

Re: [pylons-discuss] Re: Pyramid maintenance mode

2021-01-07 Thread C J
t; >> I typically handle this on nginx which sites in front of Pyramid. if you >> wanted to do everything in python, you could probably use WSGI middleware >> to route to a separate maintenance application or html file. >> >> On Thursday, January 7, 2021 at 10:09:34 AM UTC

[pylons-discuss] Pyramid maintenance mode

2021-01-07 Thread C J
Hi everybody, I am looking for an easy way to temporarily redirect all the users of my pyramid website to a maintenance vue without having to comment/delete, etc my routes. I would like to make it easy to re-activate the others routes when the maintenance is done. I found this :