mirror of
https://github.com/immich-app/immich.git
synced 2025-05-31 20:25:32 -04:00
disable metrics in dev env
This commit is contained in:
parent
f33a662f48
commit
4b422bd0f7
@ -1,5 +1,5 @@
|
|||||||
import { Inject, Injectable } from '@nestjs/common';
|
import { Inject, Injectable } from '@nestjs/common';
|
||||||
import { serverVersion } from '../domain.constant';
|
import { isDev, serverVersion } from '../domain.constant';
|
||||||
import { JobName } from '../job';
|
import { JobName } from '../job';
|
||||||
import { ISystemConfigRepository } from '../repositories';
|
import { ISystemConfigRepository } from '../repositories';
|
||||||
import { IJobRepository } from '../repositories/job.repository';
|
import { IJobRepository } from '../repositories/job.repository';
|
||||||
@ -20,9 +20,16 @@ export class MetricsService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async handleQueueMetrics() {
|
async handleQueueMetrics() {
|
||||||
if (await this.configCore.hasFeature(FeatureFlag.METRICS)) {
|
if (!(await this.configCore.hasFeature(FeatureFlag.METRICS))) {
|
||||||
await this.jobRepository.queue({ name: JobName.METRICS });
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// TODO
|
||||||
|
// if (isDev) {
|
||||||
|
// return;
|
||||||
|
// }
|
||||||
|
|
||||||
|
await this.jobRepository.queue({ name: JobName.METRICS });
|
||||||
}
|
}
|
||||||
|
|
||||||
async handleSendMetrics() {
|
async handleSendMetrics() {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user