Remove indefinite option
Some checks failed
Run build / build (push) Has been cancelled
Run formatter / check-code-formatting (push) Has been cancelled
Run lint / run-lint (push) Has been cancelled
Build and push the edge image / run-pre-checks (push) Has been cancelled
Build and push the edge image / build-publish-docker-hub (push) Has been cancelled

This commit is contained in:
Kasra Bigdeli
2025-05-26 14:36:31 -07:00
parent 7813f2f172
commit e121f65763
3 changed files with 4 additions and 3 deletions

View File

@@ -249,9 +249,10 @@ class DataStore {
const goAccessInfo = (self.data.get(GOACCESS_INFO) ||
{}) as GoAccessInfo
goAccessInfo.isEnabled = goAccessInfo.isEnabled || false
if (!goAccessInfo.data) {
if (!goAccessInfo.data || !goAccessInfo.isEnabled) {
goAccessInfo.data = {
rotationFrequencyCron: '0 0 1 * *', // monthly
logRetentionDays: 180,
}
}
return Promise.resolve(goAccessInfo)

View File

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

View File

@@ -745,7 +745,7 @@ class CaptainManager {
{
key: 'LOG_RETENTION_DAYS',
value: (
goAccessInfo.data.logRetentionDays ?? -1
goAccessInfo.data.logRetentionDays ?? 180
).toString(),
},
],