ILIAS  trunk Revision v11.0_alpha-2645-g16283d3b3f8
ilBackgroundTasksConfigStoredObjective Class Reference
+ Inheritance diagram for ilBackgroundTasksConfigStoredObjective:
+ Collaboration diagram for ilBackgroundTasksConfigStoredObjective:

Public Member Functions

 __construct (protected ilBackgroundTasksSetupConfig $config)
 
 getHash ()
 Get a hash for this objective. More...
 
 getLabel ()
 Get a label that describes this objective. More...
 
 isNotable ()
 Get to know if this is an interesting objective for a human. More...
 
 getPreconditions (Environment $environment)
 
 isApplicable (Environment $environment)
 
- Public Member Functions inherited from ILIAS\Setup\Objective
 achieve (Environment $environment)
 Objectives can be achieved. More...
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilBackgroundTasksConfigStoredObjective::__construct ( protected ilBackgroundTasksSetupConfig  $config)

Definition at line 25 of file class.ilBackgroundTasksConfigStoredObjective.php.

26  {
27  }

Member Function Documentation

◆ getHash()

ilBackgroundTasksConfigStoredObjective::getHash ( )

Get a hash for this objective.

The hash of two objectives must be the same, if they are the same objective, with the same config on the same environment, i.e. if the one is achieved the other is achieved as well because they are the same.

Implements ILIAS\Setup\Objective.

Definition at line 29 of file class.ilBackgroundTasksConfigStoredObjective.php.

29  : string
30  {
31  return hash("sha256", self::class);
32  }

◆ getLabel()

ilBackgroundTasksConfigStoredObjective::getLabel ( )

Get a label that describes this objective.

Implements ILIAS\Setup\Objective.

Definition at line 34 of file class.ilBackgroundTasksConfigStoredObjective.php.

34  : string
35  {
36  return "Fill ini with settings for components/ILIAS/BackgroundTasks_";
37  }

◆ getPreconditions()

ilBackgroundTasksConfigStoredObjective::getPreconditions ( Environment  $environment)
Returns
[]

Implements ILIAS\Setup\Objective.

Definition at line 47 of file class.ilBackgroundTasksConfigStoredObjective.php.

References $ini, ILIAS\Setup\Objective\achieve(), ILIAS\Setup\Environment\getResource(), and ilBackgroundTasksSetupConfig\TYPE_ASYNCHRONOUS.

47  : array
48  {
49  return [
51  ];
52  }
+ Here is the call graph for this function:

◆ isApplicable()

ilBackgroundTasksConfigStoredObjective::isApplicable ( Environment  $environment)

Implements ILIAS\Setup\Objective.

Definition at line 81 of file class.ilBackgroundTasksConfigStoredObjective.php.

References $ini, and ILIAS\Setup\Environment\getResource().

81  : bool
82  {
83  $ini = $environment->getResource(Environment::RESOURCE_ILIAS_INI);
84  if (!$ini->groupExists("background_tasks")) {
85  return true;
86  }
87  if ($ini->readVariable("background_tasks", "concurrency") !== $this->config->getType()) {
88  return true;
89  }
90  return $ini->readVariable("background_tasks", "number_of_concurrent_tasks") !== $this->config->getMaxCurrentTasks();
91  }
getResource(string $id)
Consumers of this method should check if the result is what they expect, e.g.
$ini
Definition: raiseError.php:20
+ Here is the call graph for this function:

◆ isNotable()

ilBackgroundTasksConfigStoredObjective::isNotable ( )

Get to know if this is an interesting objective for a human.

Implements ILIAS\Setup\Objective.

Definition at line 39 of file class.ilBackgroundTasksConfigStoredObjective.php.

39  : bool
40  {
41  return false;
42  }

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