Periodically prune old jobs from bolt

This commit is contained in:
sophia 2021-09-20 14:32:11 -05:00 committed by Paul Hinze
parent 2991810e0c
commit 57474ac8c8
No known key found for this signature in database
GPG Key ID: B69DEDF2D55501C0

View File

@ -151,8 +151,17 @@ func (s *State) Prune() error {
s.log.Debug("Finished pruning data",
"removed-jobs", jobs,
)
memTxn.Commit()
// Prune jobs from bolt
dbJobs, err := s.jobsDBPruneOld(maximumJobsIndexed)
if err != nil {
return err
}
s.log.Debug("Finished pruning db data",
"removed-jobs", dbJobs,
)
return nil
}