Background process

25 views
Skip to first unread message

Srikanth Bemineni

unread,
Apr 13, 2017, 11:32:58 PM4/13/17
to pylons-discuss
Hi,

Is there a way I can start a background process in pyramid, where a certain non-important work can be pushed to this process. I don't need to wait for this to complete to return my request.  This can be implemented in a different way, but just checking if there is already a convenient way to do this in pyramid. 

The background process needs to be started as soon as the first instance of the app is started. Other instances of the app just check if the background process is already started and does nothing. If the background process has crashed or stopped, it will start an instance again.


Srikanth Bemineni

Mikko Ohtamaa

unread,
Apr 14, 2017, 6:11:39 AM4/14/17
to pylons-...@googlegroups.com
Hi Srikanth,

Many people use Celery for background tasks (delayed or scheduled):

Raw barebone Celery integration: https://github.com/sontek/pyramid_celery

More in-depth: https://websauna.org/docs/narrative/misc/task.html

Celery has procedures for launching background worker processes, managing schedules and interprocess communications.

-Mikko
Reply all
Reply to author
Forward
0 new messages