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>
This commit is contained in:
Benjamin Gaussorgues 2026-02-04 10:39:21 +01:00
parent 2d0a24f042
commit 4112b9f7ba
No known key found for this signature in database

View file

@ -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();