0
Fork 0
mirror of https://github.com/immich-app/immich.git synced 2025-04-08 03:01:32 -05:00

disable metrics in dev env

This commit is contained in:
Daniel Dietzler 2023-12-31 19:50:10 +01:00
parent f33a662f48
commit 4b422bd0f7
No known key found for this signature in database
GPG key ID: A1C0B97CD8E18DFF

View file

@ -1,5 +1,5 @@
import { Inject, Injectable } from '@nestjs/common';
import { serverVersion } from '../domain.constant';
import { isDev, serverVersion } from '../domain.constant';
import { JobName } from '../job';
import { ISystemConfigRepository } from '../repositories';
import { IJobRepository } from '../repositories/job.repository';
@ -20,9 +20,16 @@ export class MetricsService {
}
async handleQueueMetrics() {
if (await this.configCore.hasFeature(FeatureFlag.METRICS)) {
await this.jobRepository.queue({ name: JobName.METRICS });
if (!(await this.configCore.hasFeature(FeatureFlag.METRICS))) {
return;
}
// TODO
// if (isDev) {
// return;
// }
await this.jobRepository.queue({ name: JobName.METRICS });
}
async handleSendMetrics() {