ILIAS  trunk Revision v11.0_alpha-1744-gb0451eebef4
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
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)
 
- 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()

Member Function Documentation

◆ continueTask()

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

Continue a task with a given option.

Definition at line 113 of file BasicTaskManager.php.

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

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  }
run(Bucket $bucket)
Depending on your background task settings, executes or puts the task into the queue.
+ Here is the call graph for this function:

◆ quitBucket()

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

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: