There needs to be a smarter way to launch first instance
s0logger needs to start when apache2 comes up to start logging the s0 signals. But WSGI only starts the underlying code with the first request.
Currently I am using WSGIImportScript in Apache2 to trigger a request ahgainst the API at startup which initiates the first instance of s0logger. Using this to load s0logger directly does not work, as it creates an isolated process to the instance created by the first API call. And i do not want to invest into memcache or similar to exchange global data between processes.
The python code for this first request just starts a curl to the API. I tried to do this with a direct python request, but GIL then generates a race condition: The request IO locks GIL and does not allow the s0logger.py code to be launched...