FE implementation
This commit is contained in:
1 parent
5ab230f77b
commit
b1147b8bf9
2 files changed
+10
-1
No files matched your search
@@ -390,6 +390,15 @@ export class SuperSimpleQueueHelper implements ISuperSimpleQueueHelper {
|
|||||||
const settings = await this.settingsService.getDBSettings();
|
const settings = await this.settingsService.getDBSettings();
|
||||||
|
|
||||||
const checkTTL = settings.checkTTL; // Check TTL is in DAYS, not MS
|
const checkTTL = settings.checkTTL; // Check TTL is in DAYS, not MS
|
||||||
|
|
||||||
|
if (checkTTL === 366) {
|
||||||
|
this.logger.info({
|
||||||
|
message: `Check TTL is set to unlimited, skipping cleanup`,
|
||||||
|
service: SERVICE_NAME,
|
||||||
|
method: "getCleanupRetentionJob",
|
||||||
|
});
|
||||||
|
return;
|
||||||
|
}
|
||||||
const checkTTLInMs = checkTTL * 24 * 60 * 60 * 1000;
|
const checkTTLInMs = checkTTL * 24 * 60 * 60 * 1000;
|
||||||
const cutoffDate = new Date(Date.now() - checkTTLInMs);
|
const cutoffDate = new Date(Date.now() - checkTTLInMs);
|
||||||
const deleteCount = await this.checkService.deleteOlderThan(cutoffDate);
|
const deleteCount = await this.checkService.deleteOlderThan(cutoffDate);
|
||||||
|
|||||||
@@ -6,7 +6,7 @@ import { z } from "zod";
|
|||||||
|
|
||||||
export const updateAppSettingsBodyValidation = z
|
export const updateAppSettingsBodyValidation = z
|
||||||
.object({
|
.object({
|
||||||
checkTTL: z.union([z.number(), z.literal("")]).optional(),
|
checkTTL: z.union([z.number().int().min(1).max(366), z.literal("")]).optional(),
|
||||||
systemEmailPort: z.union([z.number(), z.literal("")]).optional(),
|
systemEmailPort: z.union([z.number(), z.literal("")]).optional(),
|
||||||
|
|
||||||
pagespeedApiKey: z.union([z.string(), z.literal("")]).optional(),
|
pagespeedApiKey: z.union([z.string(), z.literal("")]).optional(),
|
||||||
|
|||||||
Reference in new issue
Block a user