Re: Django exit function

2016-09-14 Thread Erik Cederstrand
> Den 14. sep. 2016 kl. 23.00 skrev Krešimir : > > Thank you, dear Sir! > > I have tried as-user-atexit and it does not work with Ctrl+c event. Don't > know about other exit events since my machine powers the light in question. > So the light goes off when

Re: Django exit function

2016-09-14 Thread Krešimir
Thank you, dear Sir! I have tried as-user-atexit and it does not work with Ctrl+c event. Don't know about other exit events since my machine powers the light in question. So the light goes off when machine goes off anyway. Maybe if I constantly check fo existance of some django system process?

Re: Django exit function

2016-09-10 Thread Michal Petrucha
On Sat, Sep 10, 2016 at 01:51:00AM -0700, Krešimir wrote: > Hello, > > I have a turn_the_light_on() function that, well, turns on a light... > I put it in wsgi.py (as suggested by internet) just before application = > get_wsgi_application()call. > > Where can I put turn_the_light_off() function

Django exit function

2016-09-10 Thread Krešimir
Hello, I have a turn_the_light_on() function that, well, turns on a light... I put it in wsgi.py (as suggested by internet) just before application = get_wsgi_application()call. Where can I put turn_the_light_off() function call to turn off the light when the application quits? Thank you! --