I say run a separate daemon process and use supervisord to ensure it
can recover from a crash.

In fact, I recommend using supervisord for everything you ever deploy.

-Devin

On Fri, Jun 20, 2008 at 9:50 AM, EricHolmberg
<[EMAIL PROTECTED]> wrote:
>
> I would like to have a background thread handle tasks such as sending
> notification emails and doing background integrity checks on the
> database.  What is the best way to handle this?  Possible solutions
> include:
>
>  1. Start a thread in load_environment
>  2. Run a separate daemon process
>
>
> Thread in load_environment
> ---------------------------------------
> This works great for the stand-alone Pylons server daemon, but I will
> be using mod_wsgi in the production system which results in multiple
> instantiations of the Pylons app, so multiple threads will be
> created.  Should I just use this method and configure mod_wsgi to only
> start one instance of Pylons?
>
> Run a separate daemon process
> -----------------------------------------------
> This takes advantage of process isolation, but it will require
> checking to ensure that the daemon process is still running.  Is there
> a way to have Apache do this background check?  Any other solutions?
>
> Thanks,
>
> Eric
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to