Hi, John!

Thanks for quick replies :)

> Quick question :
>
> what happens with
>
> 0.upto(4) do |i|
>     $jobs[i] = $scheduler.schedule_in (rand(10) + 5) do
>         NotifMailer.deliver_notify()
>     end
> end

Works same as {} block, i.e. doesn't work properly

The funny thing is that scheduler jobs do keep reference to the block
- in AJAX "ping" action for active jobs, after putting dirty puts, I
get lines like:
#<Proc:[EMAIL PROTECTED]/script/../config/../app/controllers/
auction_controller.rb:21>

And I get this by calling
puts $scheduler.get_job(id).block.inspect

So obviously the block (its Proc object) exists in the memory. It's
just not executed when function that scheduled it ends.


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

Reply via email to