chore(openmetrics): export only "real" files count

Other files like files in trashbin or file versions should be exported
by related app

Signed-off-by: Benjamin Gaussorgues <benjamin.gaussorgues@nextcloud.com>
pull/58090/head
Benjamin Gaussorgues 4 months ago committed by backportbot[bot]
parent f7260841b7
commit 001f90b6a4
  1. 1
      lib/private/OpenMetrics/Exporters/FilesByType.php

@ -61,6 +61,7 @@ class FilesByType extends Cached {
$qb = $this->connection->getQueryBuilder()->runAcrossAllShards();
$metrics = $qb->select('mimetype', $qb->func()->count('*', 'count'))
->from('filecache')
->where($qb->expr()->like('path', $qb->createNamedParameter('files/%')))
->groupBy('mimetype')
->executeQuery();

Loading…
Cancel
Save