ReschedulerBase Class Reference
A base class for recheduling. More...
Inheritance diagram for
ReschedulerBase:
Public Member Functions |
|
reschedule ($task, $status) | |
Return new schedule time for given task or
FALSE if task schould end. |
|
Protected Member Functions |
|
get_schedules () | |
Returns all schedules for this policy as
array. |
Detailed Description
A base class for recheduling.
Definition at line 5 of file rescheduler.base.php.
Member Function Documentation
ReschedulerBase::get_schedules | ( | ) | [protected] |
Returns all schedules for this policy as array.
Array index is number of runs done, value is the difference to last run in seconds
- Returns:
- array
Reimplemented in ReschedulerDiehard1, ReschedulerDiehard2, ReschedulerDiehard3, ReschedulerTerminator2, and ReschedulerTerminator3.
Definition at line 31 of file rescheduler.base.php.
ReschedulerBase::reschedule | ( | $ | task, | |
$ | status | |||
) |
Return new schedule time for given task or FALSE if task schould end.
- Parameters:
-
DAOScheduler $task Status Indicated if schould be rescheduled on success or failure
- Returns:
- datetime
Implements IRescheduler.
Reimplemented in ReschedulerRushhour1, ReschedulerRushhour2, and ReschedulerRushhour3.
Definition at line 13 of file rescheduler.base.php.
00013 { 00014 $ret = false; 00015 $schedules = $this->get_schedules(); 00016 $runs = ($status->is_ok()) ? $task->runs_success : $task->runs_error; 00017 $delta = Arr::get_item($schedules, $runs, -1); 00018 if ($delta > 0) { 00019 $ret = time() + $delta; 00020 } 00021 return $ret; 00022 }
The documentation for this class was generated from the following file:
- contributions/scheduler/behaviour/scheduler/rescheduler.base.php