File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11module ccsync_backend
22
3- go 1.23
3+ go 1.19
44
55require (
66 github.com/charmbracelet/log v0.4.2
77 github.com/gorilla/sessions v1.2.2
8+ github.com/robfig/cron/v3 v3.0.1
89 github.com/swaggo/http-swagger v1.3.4
910 github.com/swaggo/swag v1.16.3
11+ go.etcd.io/bbolt v1.3.7
1012 golang.org/x/oauth2 v0.20.0
1113)
1214
@@ -33,10 +35,8 @@ require (
3335 github.com/muesli/termenv v0.16.0 // indirect
3436 github.com/pmezard/go-difflib v1.0.0 // indirect
3537 github.com/rivo/uniseg v0.4.7 // indirect
36- github.com/robfig/cron/v3 v3.0.1 // indirect
3738 github.com/swaggo/files v0.0.0-20220610200504-28940afbdbfe // indirect
3839 github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e // indirect
39- go.etcd.io/bbolt v1.4.3 // indirect
4040 golang.org/x/exp v0.0.0-20231006140011-7918f672742d // indirect
4141 golang.org/x/net v0.17.0 // indirect
4242 golang.org/x/sys v0.30.0 // indirect
Original file line number Diff line number Diff line change @@ -85,8 +85,8 @@ github.com/swaggo/swag v1.16.3 h1:PnCYjPCah8FK4I26l2F/KQ4yz3sILcVUN3cTlBFA9Pg=
8585github.com/swaggo/swag v1.16.3 /go.mod h1:DImHIuOFXKpMFAQjcC7FG4m3Dg4+QuUgUzJmKjI/gRk =
8686github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e h1:JVG44RsyaB9T2KIHavMF/ppJZNG9ZpyihvCd0w101no =
8787github.com/xo/terminfo v0.0.0-20220910002029-abceb7e1c41e /go.mod h1:RbqR21r5mrJuqunuUZ/Dhy/avygyECGrLceyNeo4LiM =
88- go.etcd.io/bbolt v1.4.3 h1:dEadXpI6G79deX5prL3QRNP6JB8UxVkqo4UPnHaNXJo =
89- go.etcd.io/bbolt v1.4.3 /go.mod h1:tKQlpPaYCVFctUIgFKFnAlvbmB3tpy1vkTnDWohtc0E =
88+ go.etcd.io/bbolt v1.3.7 h1:j+zJOnnEjF/kyHlDDgGnVL/AIqIJPq8UoB2GSNfkUfQ =
89+ go.etcd.io/bbolt v1.3.7 /go.mod h1:N9Mkw9X8x5fupy0IKsmuqVtoGDyxsaDlbk4Rd05IAQw =
9090golang.org/x/exp v0.0.0-20231006140011-7918f672742d h1:jtJma62tbqLibJ5sFQz8bKtEM8rJBtfilJ2qTU199MI =
9191golang.org/x/exp v0.0.0-20231006140011-7918f672742d /go.mod h1:ldy0pHrwJyGW56pPQzzkH36rKxoZW1tw7ZJpeKx+hdo =
9292golang.org/x/mod v0.13.0 h1:I/DsJXRlw/8l/0c24sM9yb0T4z9liZTduXvdAWYiysY =
Original file line number Diff line number Diff line change @@ -20,11 +20,21 @@ func NewMaintenanceWorker(queue PersistentJobQueue) *MaintenanceWorker {
2020}
2121
2222func (mw * MaintenanceWorker ) Start () error {
23+ // CLEANUP_CRON_SCHEDULE: Cron expression for cleanup schedule
24+ // Format: "minute hour day month weekday"
25+ // Examples:
26+ // "0 0 * * *" - Daily at midnight (default)
27+ // "0 */6 * * *" - Every 6 hours
28+ // "0 2 * * *" - Daily at 2 AM
29+ // "0 0 * * 0" - Weekly on Sunday
2330 schedule := os .Getenv ("CLEANUP_CRON_SCHEDULE" )
2431 if schedule == "" {
2532 schedule = "0 0 * * *"
2633 }
2734
35+ // CLEANUP_RETENTION_DAYS: Number of days to keep completed/failed job logs
36+ // Default: 7 days
37+ // Set to higher value to keep logs longer, lower to cleanup more frequently
2838 retentionDaysStr := os .Getenv ("CLEANUP_RETENTION_DAYS" )
2939 retentionDays := 7
3040 if retentionDaysStr != "" {
You can’t perform that action at this time.
0 commit comments