mirror of
https://github.com/Unleash/unleash.git
synced 2025-01-31 00:16:47 +01:00
chore: remove schedulers (#5895)
This commit is contained in:
parent
1c84a81178
commit
3e186f1986
@ -29,6 +29,7 @@ exports[`should create default config 1`] = `
|
|||||||
"enabled": true,
|
"enabled": true,
|
||||||
"maxAge": 3600000,
|
"maxAge": 3600000,
|
||||||
},
|
},
|
||||||
|
"dailyMetricsStorageDays": 31,
|
||||||
"db": {
|
"db": {
|
||||||
"acquireConnectionTimeout": 30000,
|
"acquireConnectionTimeout": 30000,
|
||||||
"applicationName": "unleash",
|
"applicationName": "unleash",
|
||||||
|
@ -551,6 +551,11 @@ export function createConfig(options: IUnleashOptions): IUnleashConfig {
|
|||||||
|
|
||||||
const feedbackUriPath = process.env.FEEDBACK_URI_PATH;
|
const feedbackUriPath = process.env.FEEDBACK_URI_PATH;
|
||||||
|
|
||||||
|
const dailyMetricsStorageDays = Math.min(
|
||||||
|
parseEnvVarNumber(process.env.DAILY_METRICS_STORAGE_DAYS, 31),
|
||||||
|
92,
|
||||||
|
);
|
||||||
|
|
||||||
return {
|
return {
|
||||||
db,
|
db,
|
||||||
session,
|
session,
|
||||||
@ -587,6 +592,7 @@ export function createConfig(options: IUnleashOptions): IUnleashConfig {
|
|||||||
metricsRateLimiting,
|
metricsRateLimiting,
|
||||||
rateLimiting,
|
rateLimiting,
|
||||||
feedbackUriPath,
|
feedbackUriPath,
|
||||||
|
dailyMetricsStorageDays,
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -145,22 +145,6 @@ export const scheduleServices = async (
|
|||||||
'clearMetrics',
|
'clearMetrics',
|
||||||
);
|
);
|
||||||
|
|
||||||
schedulerService.schedule(
|
|
||||||
() => {
|
|
||||||
clientMetricsServiceV2.clearDailyMetrics(92).catch(console.error);
|
|
||||||
},
|
|
||||||
hoursToMilliseconds(24),
|
|
||||||
'clearDailyMetrics',
|
|
||||||
);
|
|
||||||
|
|
||||||
schedulerService.schedule(
|
|
||||||
() => {
|
|
||||||
clientMetricsServiceV2.aggregateDailyMetrics().catch(console.error);
|
|
||||||
},
|
|
||||||
hoursToMilliseconds(24),
|
|
||||||
'aggregateDailyMetrics',
|
|
||||||
);
|
|
||||||
|
|
||||||
schedulerService.schedule(
|
schedulerService.schedule(
|
||||||
accountService.updateLastSeen.bind(accountService),
|
accountService.updateLastSeen.bind(accountService),
|
||||||
minutesToMilliseconds(3),
|
minutesToMilliseconds(3),
|
||||||
|
@ -133,6 +133,7 @@ export interface IUnleashOptions {
|
|||||||
publicFolder?: string;
|
publicFolder?: string;
|
||||||
disableScheduler?: boolean;
|
disableScheduler?: boolean;
|
||||||
metricsRateLimiting?: Partial<IMetricsRateLimiting>;
|
metricsRateLimiting?: Partial<IMetricsRateLimiting>;
|
||||||
|
dailyMetricsStorageDays?: number;
|
||||||
rateLimiting?: Partial<IRateLimiting>;
|
rateLimiting?: Partial<IRateLimiting>;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -236,6 +237,7 @@ export interface IUnleashConfig {
|
|||||||
segmentValuesLimit: number;
|
segmentValuesLimit: number;
|
||||||
strategySegmentsLimit: number;
|
strategySegmentsLimit: number;
|
||||||
metricsRateLimiting: IMetricsRateLimiting;
|
metricsRateLimiting: IMetricsRateLimiting;
|
||||||
|
dailyMetricsStorageDays: number;
|
||||||
clientFeatureCaching: IClientCachingOption;
|
clientFeatureCaching: IClientCachingOption;
|
||||||
accessControlMaxAge: number;
|
accessControlMaxAge: number;
|
||||||
prometheusApi?: string;
|
prometheusApi?: string;
|
||||||
|
Loading…
Reference in New Issue
Block a user