ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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
43 "type",
44 $ini->readVariable("background_tasks", "concurrency"),
45 "The type of execution used for background tasks"
46 );
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}
Base class to simplify collection of metrics.
An environment holds resources to be used in the setup process.
Definition: Environment.php:28
getResource(string $id)
Consumers of this method should check if the result is what they expect, e.g.
storeConfigGauge(string $key, $value, ?string $description=null)
storeConfigText(string $key, string $value, ?string $description=null)
$ini
Definition: raiseError.php:20