Hi Tomasz,

On 7/19/07, [EMAIL PROTECTED] <[EMAIL PROTECTED]> wrote:
>
> Hi!
>
> I've got a problem with persistence (or rather lack of thereof) of
> code blocks passed to scheduler's schedule_in method.
>
> I'm initializing a scheduler global in environment.rb:
> require 'rubygems'
> require 'time'
> require 'openwfe/util/scheduler'
> include OpenWFE
>
> $scheduler = Scheduler.new
> $scheduler.start
>
> I'm at the testing&discovery level of OpenWFEru, so I wrote a
> controller which in "start" action generates and schedules some jobs
> to execute:
> 0.upto(4) do |i|
>  $jobs[i] = $scheduler.schedule_in (rand(10) + 5)
> { NotifMailer.deliver_notify() }
> end

Quick question :

what happens with

0.upto(4) do |i|
    $jobs[i] = $scheduler.schedule_in (rand(10) + 5) do
        NotifMailer.deliver_notify()
    end
end

?

The Proc issue is normal, the scheduler is currently not meant for
accepting a block. I'll "fix" that by issue a better error message
when not passing a block (or a Schedulable object).

-- 
John Mettraux   -///-   http://jmettraux.openwfe.org

--~--~---------~--~----~------------~-------~--~----~
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