[Catalyst] Taking advantage of idle periods by performing some action(s)

Ido Perlmuter ido at ido50.net
Thu Mar 25 12:30:58 GMT 2010

Hi everyone.

I'm looking for direction on how to possibly implement a feature in a
Catalyst app that automatically performs some action, or actions, when the
app is idle and hasn't been accepting requests (either none or some small
number). For example, let's say I want my app to take advantage of such
situations by indexing documents to KinoSearch, rebuilding a sitemap.xml
file, whatever.

The idea is, basically, to define a situation in which your app can be
considered idle (no requests in the past 3 minutes, only 2 requests per
minute, I don't know), and then forcing the app to maybe create a fake
request to a Private action that does whatever it is I want. It might also
be necessary to force the action to "break out early" in case the app starts
receiving more requests and can no longer be considered idle.

Thing is, I do not want (if possible) to implement a job queue such as
TheSchwartz. I do not want an outside worker, I want my app to be the
worker, and let it decide by itself what to do instead of take jobs from a

Any help will be appreciated, I still can't think of a way to do this.

Thanks a lot,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.scsys.co.uk/pipermail/catalyst/attachments/20100325/ef362=

More information about the Catalyst mailing list