On Tuesday, March 19, 2013 2:31:09 PM UTC-4, Vincent Catalano wrote:
>
> I am not using a commandline interface. I ended up creating a new 
> APScheduler instance from within the applications main() function. That 
> way, the scheduled service will run only when the server is running. It is 
> in the applications main() function that I create a pyramid_mailer instance 
> and pass it to the APScheduler instance as well as save it to the 
> applications registry so that I have a single shared mailer.
>
> Would you advise against creating a scheduler instance at the main() 
> method level?
>
> --Vincent
>

I don't know much about APScheduler to advise against it, but the 
commandline interface is ridiculously simple and powerful.  It took me 
about 20 minutes to set up a "maintenance" framework via 
pyramid.paster.bootstrap , and it takes no time for me to create new 
maintenance tasks.  Some l only run once or twice, via the commandline. 
 Others I fire off via a cronjob.  Ostensibly one could be a subprocess a 
scheduled app pops open.

I generally dislike running maintenance routines from the webserver (as in 
process) , so I can better control how memory and CPU are used within a 
machine or cluster.  ( akin to running the heavy admin tools separate from 
more lightweight user views ) that's just my personal preference though.

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.


Reply via email to