On Mon, Mar 1, 2010 at 5:00 AM, Gonzalo Suarez <[email protected]> wrote: > > So when I run it, it just prints "hi everyone!" once and then ruote > quits. Wrapping the "every" expression inside a "sequence" expression > results in the same behaviour. I don't know what I'm doing wrong...
Hello Gonzalo, if you look at the documentation for the cron/every expression http://ruote.rubyforge.org/exp/cron.html there is this "Triggered children subprocesses are ‘forgotten’. This implies they "will never reply to the cron/every expression and they won’t get cancelled "when the cron/every expression gets cancelled (the cron/every schedule "gets cancelled though, no new children will get cancelled). Hmm, so that would imply that the engine.wait_for(wfid) is never unlocked... If you make the engine noisy by placing this right before the engine.launch(...) : engine.context.logger.noisy = true The logger will display every operation the engine goes through and you'll notice that a red "ce" operation is processed. It means "ceased" and the wait_for command is set to unlock when a process emits a "terminated", "error" or "ceased" event. The "ceased" is emitted by each "every" instance. So your program already exits after the first "hi everyone!". You can replace the engine.wait_for(wfid) by a sleep(10) to see more messages. I did not provide an engine.join() since engine.wait_for() is used only for demo or testing purposes. Here is the updated gist : http://gist.github.com/317928 Best regards, -- John Mettraux - http://jmettraux.wordpress.com -- you received this message because you are subscribed to the "ruote users" group. to post : send email to [email protected] to unsubscribe : send email to [email protected] more options : http://groups.google.com/group/openwferu-users?hl=en
