ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ILIAS\BackgroundTasks\Implementation\TaskManager\BasicTaskManager Class Reference
+ Inheritance diagram for ILIAS\BackgroundTasks\Implementation\TaskManager\BasicTaskManager:
+ Collaboration diagram for ILIAS\BackgroundTasks\Implementation\TaskManager\BasicTaskManager:

Public Member Functions

 __construct (protected Persistence $persistence)
 
 continueTask (Bucket $bucket, Option $option)
 Continue a task with a given option. More...
 
 quitBucket (Bucket $bucket)
 Quits and deletes a Bucket with all it's Jobs. More...
 
- Public Member Functions inherited from ILIAS\BackgroundTasks\TaskManager
 executeTask (Task $task, Observer $observer)
 Actually executes a task. More...
 
 run (Bucket $bucket)
 Depending on your background task settings, executes or puts the task into the queue. More...
 
 continueTask (Bucket $bucket, Option $option)
 Continue a task that is the state UserInteraction with a given option. More...
 
 quitBucket (Bucket $bucket)
 Quits and deletes a Bucket with all it's Jobs. More...
 

Detailed Description

Definition at line 47 of file BasicTaskManager.php.

Constructor & Destructor Documentation

◆ __construct()

ILIAS\BackgroundTasks\Implementation\TaskManager\BasicTaskManager::__construct ( protected Persistence  $persistence)

Reimplemented in ILIAS\BackgroundTasks\Implementation\TaskManager\SyncTaskManager.

Definition at line 49 of file BasicTaskManager.php.

50 {
51 }

Member Function Documentation

◆ continueTask()

ILIAS\BackgroundTasks\Implementation\TaskManager\BasicTaskManager::continueTask ( Bucket  $bucket,
Option  $option 
)

Continue a task with a given option.

Implements ILIAS\BackgroundTasks\TaskManager.

Definition at line 113 of file BasicTaskManager.php.

113 : void
114 {
115 // We do the user interaction
116 $bucket->userInteraction($option);
117 if ($bucket->getState() != State::FINISHED) { // The job is not done after the user interaction, so we continue to run it.
118 $this->run($bucket);
119 } else {
120 $this->persistence->deleteBucket($bucket);
121 }
122 }
userInteraction(Option $option)
Let the user interact with the bucket task queue.
run(Bucket $bucket)
Depending on your background task settings, executes or puts the task into the queue.

References ILIAS\BackgroundTasks\Implementation\Bucket\State\FINISHED, ILIAS\BackgroundTasks\Bucket\getState(), ILIAS\BackgroundTasks\TaskManager\run(), and ILIAS\BackgroundTasks\Bucket\userInteraction().

+ Here is the call graph for this function:

◆ quitBucket()

ILIAS\BackgroundTasks\Implementation\TaskManager\BasicTaskManager::quitBucket ( Bucket  $bucket)

Quits and deletes a Bucket with all it's Jobs.

Implements ILIAS\BackgroundTasks\TaskManager.

Definition at line 127 of file BasicTaskManager.php.

127 : void
128 {
129 $this->persistence->deleteBucket($bucket);
130 }

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