mirror of
https://github.com/safing/portbase
synced 2025-09-16 10:09:49 +00:00
Disable hourly DB wipe, improve DB maintainance
This commit is contained in:
parent
dd892c97d2
commit
9d526314a9
3 changed files with 68 additions and 13 deletions
|
@ -5,6 +5,7 @@ import (
|
|||
"time"
|
||||
|
||||
"github.com/safing/portbase/database"
|
||||
"github.com/safing/portbase/log"
|
||||
"github.com/safing/portbase/modules"
|
||||
)
|
||||
|
||||
|
@ -15,13 +16,16 @@ func startMaintenanceTasks() {
|
|||
}
|
||||
|
||||
func maintainBasic(ctx context.Context, task *modules.Task) error {
|
||||
log.Infof("database: running Maintain")
|
||||
return database.Maintain()
|
||||
}
|
||||
|
||||
func maintainThorough(ctx context.Context, task *modules.Task) error {
|
||||
log.Infof("database: running MaintainThorough")
|
||||
return database.MaintainThorough()
|
||||
}
|
||||
|
||||
func maintainRecords(ctx context.Context, task *modules.Task) error {
|
||||
return database.MaintainRecordStates()
|
||||
log.Infof("database: running MaintainRecordStates")
|
||||
return database.MaintainRecordStates(ctx)
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue