I need to start several (5) long running processes together with my
uWSGI web application. These background proccesses are also python
programs, and use the same configuration as the web app.
Currently I run uwsgi with "mules = 6" and then in my .wsgi file I have:
application = myapp.web.create_app('config.yaml')
mulefunc(2)(myapp.workers.Notify(application.config).run)()
mulefunc(3)(myapp.workers.Expire(application.config).run)()
mulefunc(4)(myapp.workers.Pending(application.config).run)()
mulefunc(5)(myapp.workers.Open(application.config).run)()
mulefunc(6)(myapp.workers.PickupEmails(application.config).run)()
to start these jobs…
Now the problem is, I don't think these jobs are restarted if they
crash, which I need. And also it seems not all of them even run. And
sometimes I can see only one of the workers started 5 times or so -
which is very unusual.
Now my question is, what would be a more proper way to run these
workers, so that they are started and stopped with the uWSGI
application, and restarted if they crash, considering they are all
endless loops.
--
дамјан
_______________________________________________
uWSGI mailing list
[email protected]
http://lists.unbit.it/cgi-bin/mailman/listinfo/uwsgi