ILIAS  release_5-3 Revision v5.3.23-19-g915713cf615
ILIAS\BackgroundTasks\Observer Interface Reference
+ Inheritance diagram for ILIAS\BackgroundTasks\Observer:
+ Collaboration diagram for ILIAS\BackgroundTasks\Observer:

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

Detailed Description

Definition at line 5 of file Observer.php.

Member Function Documentation

◆ heartbeat()

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.

Returns
void

Implemented in ILIAS\BackgroundTasks\Implementation\TaskManager\PersistingObserver, ILIAS\BackgroundTasks\Implementation\TaskManager\NonPersistingObserver, and ILIAS\BackgroundTasks\Implementation\TaskManager\MockObserver.

◆ notifyCurrentTask()

ILIAS\BackgroundTasks\Observer::notifyCurrentTask ( Task  $task)

◆ notifyPercentage()

ILIAS\BackgroundTasks\Observer::notifyPercentage ( Task  $task,
  $percentage 
)

◆ notifyState()

ILIAS\BackgroundTasks\Observer::notifyState (   $state)

If the bucket goes into another state notify the observer.

This also triggers a heartbeat.

Parameters
$stateint

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().

+ Here is the caller graph for this function:

The documentation for this interface was generated from the following file: