Dear Group member, We have coded a flask server that has embedded all the logic towards our web application.
We have successfully managed to run a pilot project with a hello world flask web application being externally exposed using Apache and mod_wsgi (within a Docker Swarm). We are now putting together our learning from this pilot for making our original flask web application production ready. We have the apache .conf file and .wsgi file in place and are able to route REST requests to Apache to our web application. We are however unable to understand where to place the initialisation code that should be run only once. This involves initialisation of logger and also establishing a connection to our microservices (framework) server. We would like this initialisation code to be run only once. Subsequent REST requests to our flask web application (through mod-wsgi) should have access to variables initialised in initialisation code. Besides if connection to the microservices server fails (during initialisation) we do not want the apache server to start hosting our web application i.e we only log the reason for failure and stop. We are new to Flask and Mod-Wsgi. Any mistakes in our terminology should be forgiven. We would be grateful for any help (in the simplest possible language). Regards, Dhiraj. -- You received this message because you are subscribed to the Google Groups "modwsgi" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at https://groups.google.com/group/modwsgi. For more options, visit https://groups.google.com/d/optout.
