forked from syntaxbullet/AuroraBot-discord
feat: implement scheduled cleanup job for expired data
This commit is contained in:
@@ -69,6 +69,12 @@ export interface GameConfigType {
|
||||
autoTimeoutThreshold?: number;
|
||||
};
|
||||
};
|
||||
system: {
|
||||
cleanup: {
|
||||
intervalMs: number;
|
||||
questArchiveDays: number;
|
||||
};
|
||||
};
|
||||
}
|
||||
|
||||
// Initial default config state
|
||||
@@ -160,6 +166,17 @@ const configSchema = z.object({
|
||||
cases: {
|
||||
dmOnWarn: true
|
||||
}
|
||||
}),
|
||||
system: z.object({
|
||||
cleanup: z.object({
|
||||
intervalMs: z.number().default(24 * 60 * 60 * 1000), // Daily
|
||||
questArchiveDays: z.number().default(30)
|
||||
})
|
||||
}).default({
|
||||
cleanup: {
|
||||
intervalMs: 24 * 60 * 60 * 1000,
|
||||
questArchiveDays: 30
|
||||
}
|
||||
})
|
||||
});
|
||||
|
||||
|
||||
Reference in New Issue
Block a user