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:
parent
f33a662f48
commit
4b422bd0f7
1 changed files with 10 additions and 3 deletions
|
@ -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() {
|
||||
|
|
Loading…
Add table
Reference in a new issue