Op 22 jul 2008, om 07:04 heeft hemant het volgende geschreven:
On Tue, Jul 22, 2008 at 2:23 AM, Joost Baaij <[EMAIL PROTECTED]>
wrote:
I am building a Rails website which has content that expires at
some time in
the future.
I realise I can build a worker that goes into a sleep/wait loop
until the
desired time, but that's not really better than polling.
You don't need an explicit sleep in worker, it will wait anyways on
select().
I don't understand, which select are you referring to?
Is that a method somewhere in backgroundrb?
Also, by "one off", you mean, a worker that starts when on schedule
and stops after that, you can use "reload_on_schedule true" in worker.
Not entirely what I mean, I mean I only need to execute one command at
one time in the future.
So for example I only need to call the Rails method
expire_fragment('sidebar') at 2008-07-24 21:00:00 as a one-time event.
_______________________________________________
Backgroundrb-devel mailing list
[email protected]
http://rubyforge.org/mailman/listinfo/backgroundrb-devel