mirror of
https://github.com/hashicorp/vagrant.git
synced 2026-06-09 00:32:06 -04:00
Periodically prune old jobs from bolt
This commit is contained in:
parent
2991810e0c
commit
57474ac8c8
1 changed files with 10 additions and 1 deletions
|
|
@ -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
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue