Cleanup catchup config

This commit is contained in:
Dillon Shook
2024-11-08 09:50:39 -05:00
parent 9f738e3e81
commit 119ef3e6c0
3 changed files with 1 additions and 7 deletions

View File

@@ -251,8 +251,6 @@ class DataStore {
goAccessInfo.isEnabled = goAccessInfo.isEnabled || false
goAccessInfo.data.rotationFrequencyCron =
goAccessInfo.data.rotationFrequencyCron ?? '0 0 1 * *' // monthly
goAccessInfo.data.catchupFrequencyCron =
goAccessInfo.data.catchupFrequencyCron ?? '*/10 * * * *' // every 10 minutes
return Promise.resolve(goAccessInfo)
}

View File

@@ -2,7 +2,6 @@ export class GoAccessInfo {
public isEnabled: boolean
public data: {
rotationFrequencyCron: string
catchupFrequencyCron: string
logRetentionDays?: number
}
}

View File

@@ -685,10 +685,7 @@ class CaptainManager {
const enabled = goAccessInfo.isEnabled
// Validate cron schedules
if (
!Utils.validateCron(goAccessInfo.data.catchupFrequencyCron) ||
!Utils.validateCron(goAccessInfo.data.rotationFrequencyCron)
) {
if (!Utils.validateCron(goAccessInfo.data.rotationFrequencyCron)) {
throw ApiStatusCodes.createError(
ApiStatusCodes.ILLEGAL_PARAMETER,
'Invalid cron schedule'