Module: Protege::Loop
- Extended by:
- Loop
- Included in:
- Loop
- Defined in:
- lib/protege/loop.rb,
lib/protege/loop/schedule.rb,
lib/protege/loop/scheduler.rb
Overview
LOGI "L" — the loop layer. Owns scheduled, proactive work: deciding which responsibilities are due
on each clock tick and dispatching their runs. The Scheduler drives dispatch and Schedule parses
and evaluates cron expressions.
Class methods on this module are the cross-namespace entry points. Callers (the recurring tick job,
the Responsibility model) use these rather than reaching into Scheduler / Schedule directly.
Defined Under Namespace
Instance Method Summary collapse
-
#dispatch ⇒ void
Dispatch a run for every responsibility due right now.
-
#schedule_due?(expression, at:) ⇒ Boolean
Report whether a cron expression is due at a given time.
-
#schedule_valid?(expression) ⇒ Boolean
Report whether a cron expression is well-formed — for model validation.
Instance Method Details
#dispatch ⇒ void
This method returns an undefined value.
Dispatch a run for every responsibility due right now. Called once per clock tick.
16 17 18 |
# File 'lib/protege/loop.rb', line 16 def dispatch Scheduler.dispatch end |