mirror of
https://github.com/caprover/caprover
synced 2025-12-07 20:15:33 +00:00
Cleanup catchup config
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
|
||||
@@ -2,7 +2,6 @@ export class GoAccessInfo {
|
||||
public isEnabled: boolean
|
||||
public data: {
|
||||
rotationFrequencyCron: string
|
||||
catchupFrequencyCron: string
|
||||
logRetentionDays?: number
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user