ILIAS
release_5-3 Revision v5.3.23-19-g915713cf615
|
Public Member Functions | |
notifyState ($state) | |
If the bucket goes into another state notify the observer. More... | |
notifyPercentage (Task $task, $percentage) | |
You can change the progress of a currently running task. More... | |
notifyCurrentTask (Task $task) | |
If the current task changes notify the observer. More... | |
heartbeat () | |
I'm still alive! If your calculation takes a really long time don't forget to use the heartbeat. More... | |
Definition at line 5 of file Observer.php.
ILIAS\BackgroundTasks\Observer::heartbeat | ( | ) |
I'm still alive! If your calculation takes a really long time don't forget to use the heartbeat.
Otherwise the bucket might be killed while still running. All notify tasks of the observer also trigger a heartbeat.
Implemented in ILIAS\BackgroundTasks\Implementation\TaskManager\PersistingObserver, ILIAS\BackgroundTasks\Implementation\TaskManager\NonPersistingObserver, and ILIAS\BackgroundTasks\Implementation\TaskManager\MockObserver.
ILIAS\BackgroundTasks\Observer::notifyCurrentTask | ( | Task | $task | ) |
If the current task changes notify the observer.
This also triggers a heartbeat.
Task | $task |
Implemented in ILIAS\BackgroundTasks\Implementation\TaskManager\PersistingObserver, ILIAS\BackgroundTasks\Implementation\TaskManager\NonPersistingObserver, and ILIAS\BackgroundTasks\Implementation\TaskManager\MockObserver.
Referenced by ILIAS\BackgroundTasks\Implementation\TaskManager\BasicTaskManager\__construct().
ILIAS\BackgroundTasks\Observer::notifyPercentage | ( | Task | $task, |
$percentage | |||
) |
You can change the progress of a currently running task.
This also triggers a heartbeat.
Task | $task | |
int | $percentage |
Implemented in ILIAS\BackgroundTasks\Implementation\TaskManager\PersistingObserver, ILIAS\BackgroundTasks\Implementation\TaskManager\NonPersistingObserver, and ILIAS\BackgroundTasks\Implementation\TaskManager\MockObserver.
Referenced by ILIAS\BackgroundTasks\Implementation\TaskManager\BasicTaskManager\__construct(), and ILIAS\BackgroundTasks\Implementation\Tasks\SlowPlusJob\getOutputType().
ILIAS\BackgroundTasks\Observer::notifyState | ( | $state | ) |
If the bucket goes into another state notify the observer.
This also triggers a heartbeat.
$state | int |
Implemented in ILIAS\BackgroundTasks\Implementation\TaskManager\PersistingObserver, ILIAS\BackgroundTasks\Implementation\TaskManager\NonPersistingObserver, and ILIAS\BackgroundTasks\Implementation\TaskManager\MockObserver.
Referenced by ILIAS\BackgroundTasks\Implementation\TaskManager\BasicTaskManager\__construct().