creating alerts

classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

creating alerts

mark123

i am trying to build an alert system where i want to send out e-mail
alerts periodically (every 5 mins, 15 mins etc..)  until a specified
time.
this alert has to be created dynamically and i dont know this at the
beginning of launching the python program.
the alerts created is stored in a postgres database.

what is the best way to do this?
thanks
mark


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

Reply | Threaded
Open this post in threaded view
|

Re: creating alerts

Robert Brewer
[hidden email] wrote:
> i am trying to build an alert system where i
> want to send out e-mail alerts periodically
> (every 5 mins, 15 mins etc..)  until a specified
> time. this alert has to be created dynamically
> and i dont know this at the beginning of
> launching the python program. the alerts
> created is stored in a postgres database.
> what is the best way to do this?

Start a new threading.Timer to check the DB and send out alerts. In most deployments, it should run on its own, separately from any actual requests. If it's really mission-critical, use a separate, supervised process.

I've got what I think is a nice Worker (and Scheduler) class at http://projects.amor.org/misc/wiki/Recur. There are other such modules, of course; there's one in Turbogears that gets used quite a bit.


Robert Brewer
System Architect
Amor Ministries
[hidden email]


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

winmail.dat (4K) Download Attachment