ILIAS  trunk Revision v5.2.0beta1-34115-g3a2438be29
ILIAS\BackgroundTasks\Observer Interface Reference
+ Inheritance diagram for ILIAS\BackgroundTasks\Observer:
+ Collaboration diagram for ILIAS\BackgroundTasks\Observer:

Public Member Functions

 notifyState (int $state)
 If the bucket goes into another state notify the observer. More...
 
 notifyPercentage (Task $task, int $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 21 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.

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)

If the current task changes notify the observer.

This also triggers a heartbeat.

Referenced by ILIAS\BackgroundTasks\Implementation\TaskManager\BasicTaskManager\__construct().

+ Here is the caller graph for this function:

◆ notifyPercentage()

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

You can change the progress of a currently running task.

This also triggers a heartbeat.

Referenced by ILIAS\BackgroundTasks\Implementation\TaskManager\BasicTaskManager\__construct().

+ Here is the caller graph for this function:

◆ notifyState()

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

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