mirror of
https://github.com/nextcloud/server.git
synced 2026-04-15 22:11:17 -04:00
Merge pull request #57765 from nextcloud/fix/noid/openmetrics-multiple-app-exporters
This commit is contained in:
commit
739b018312
1 changed files with 12 additions and 7 deletions
|
|
@ -63,13 +63,18 @@ class ExporterManager {
|
|||
if (!isset($appInfo[self::XML_ENTRY]) || !is_array($appInfo[self::XML_ENTRY])) {
|
||||
continue;
|
||||
}
|
||||
foreach ($appInfo[self::XML_ENTRY] as $classname) {
|
||||
if (isset($this->skippedClasses[$classname])) {
|
||||
continue;
|
||||
}
|
||||
$exporter = $this->loadExporter($classname, $appId);
|
||||
if ($exporter !== null) {
|
||||
yield $exporter;
|
||||
foreach ($appInfo[self::XML_ENTRY] as $classEntries) {
|
||||
// When multiple exporters are specified, $classEntries will be an array, instead of a string
|
||||
$classnames = is_array($classEntries) ? $classEntries : [$classEntries];
|
||||
|
||||
foreach ($classnames as $classname) {
|
||||
if (isset($this->skippedClasses[$classname])) {
|
||||
continue;
|
||||
}
|
||||
$exporter = $this->loadExporter($classname, $appId);
|
||||
if ($exporter !== null) {
|
||||
yield $exporter;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue