On 11/5/07, Lee Fyock <[EMAIL PROTECTED]> wrote:
>
> Hi--
>
> I'm trying to debug some weird behavior with tagged jobs, and I'm
> having a tough time in part because there's no direct way to traverse
> the list of jobs.
>
> There's "every_job_count", "at_job_count", "pending_job_count", and
> "cron_job_count". There's "find_jobs" (which finds by tag) and
> "get_job" (which finds by job ID).
>
> I can sum up all the "_job_count" routines, then call get_job with an
> ID up to that sum, but that won't pick up all the jobs if there were
> old jobs that expired. Or I can use a heuristic that keeps asking for
> jobs until I get 20 nils in a row. :-)
>
> My feature request is to have a "jobs" method that returns all jobs.
Hi Lee,
you can do
---8<---
class << scheduler
attr_reader :pending_jobs
attr_reader :cron_jobs
end
--->8---
pending_jobs is a list of 'at' jobs, with jobs to execute soon on top
of the list.
cron_jobs is a hash job_id => cron_job
Hope this helps, best regards,
--
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
-~----------~----~----~----~------~----~------~--~---