ILIAS  trunk Revision v11.0_alpha-2645-g16283d3b3f8
class.ilBackgroundTasksMetricsCollectedObjective.php
Go to the documentation of this file.
1 <?php
2 
22 
24 {
28  public function getTentativePreconditions(Environment $environment): array
29  {
30  return [
32  ];
33  }
34 
35  public function collectFrom(Environment $environment, Storage $storage): void
36  {
37  $ini = $environment->getResource(Environment::RESOURCE_ILIAS_INI);
38  if (!$ini) {
39  return;
40  }
41 
42  $storage->storeConfigText(
43  "type",
44  $ini->readVariable("background_tasks", "concurrency"),
45  "The type of execution used for background tasks"
46  );
47  $storage->storeConfigGauge(
48  "max_number_of_concurrent_tasks",
49  (int) $ini->readVariable("background_tasks", "number_of_concurrent_tasks"),
50  "The maximum amount of concurrent tasks used to run background tasks."
51  );
52  }
53 }
storeConfigGauge(string $key, $value, ?string $description=null)
storeConfigText(string $key, string $value, ?string $description=null)
Base class to simplify collection of metrics.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getResource(string $id)
Consumers of this method should check if the result is what they expect, e.g.
An environment holds resources to be used in the setup process.
Definition: Environment.php:27
$ini
Definition: raiseError.php:20