ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
class.ilBackgroundTasksMetricsCollectedObjective.php
Go to the documentation of this file.
1 <?php
2 
19 use ILIAS\Setup;
20 
21 class ilBackgroundTasksMetricsCollectedObjective extends Setup\Metrics\CollectedObjective
22 {
26  public function getTentativePreconditions(Setup\Environment $environment): array
27  {
28  return [
30  ];
31  }
32 
33  public function collectFrom(Setup\Environment $environment, Setup\Metrics\Storage $storage): void
34  {
35  $ini = $environment->getResource(Setup\Environment::RESOURCE_ILIAS_INI);
36  if (!$ini) {
37  return;
38  }
39 
40  $storage->storeConfigText(
41  "type",
42  $ini->readVariable("background_tasks", "concurrency"),
43  "The type of execution used for background tasks"
44  );
45  $storage->storeConfigGauge(
46  "max_number_of_concurrent_tasks",
47  (int) $ini->readVariable("background_tasks", "number_of_concurrent_tasks"),
48  "The maximum amount of concurrent tasks used to run background tasks."
49  );
50  }
51 }
collectFrom(Setup\Environment $environment, Setup\Metrics\Storage $storage)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
An environment holds resources to be used in the setup process.
Definition: Environment.php:27
$ini
Definition: raiseError.php:4