i should add, the pattern for doing this in nginx is often called a flag or 
semaphore

i found this article that goes through a 
how-to  
https://blog.devcloud.hosting/configuring-nginx-for-quickly-switching-to-maintenance-mode-e4136cf497f3

basically, you just touch/remove a specific file to change the routing on 
nginx. while the existence of the file is checked on every request, due to 
the way nginx and operating system cache the information this is negligible 
and essentially handled in memory.

On Thursday, January 7, 2021 at 12:43:46 PM UTC-5 Jonathan Vanasco wrote:

> 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-5 C J wrote:
>
>> 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 :
>> https://pypi.org/project/pyramid_maintenance/
>> but  I always get :
>>
>> in renderer
>>     raise ValueError('No such renderer factory %s' % str(self.type))
>> ValueError: No such renderer factory .jinja2"
>>
>> with my browser displaying :
>> "Internal Server Error The server encountered an unexpected internal 
>> server error (generated by waitress)"
>>
>> I am new to Pyramid so please give me the necessary details step by step.
>>
>> Best regards.
>> Cedric J.
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to pylons-discuss+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pylons-discuss/17953aa8-8bef-4ae8-a2dc-96a2bd7ae45en%40googlegroups.com.

Reply via email to