dashboard history: clean up dashboard version history

This commit is contained in:
Alexander Zobnin
2017-11-14 18:22:18 +03:00
parent 6d7eacfa81
commit 08e2bbef83
5 changed files with 124 additions and 1 deletions
+5
View File
@@ -45,6 +45,7 @@ func (service *CleanUpService) start(ctx context.Context) error {
case <-ticker.C:
service.cleanUpTmpFiles()
service.deleteExpiredSnapshots()
service.deleteExpiredDashboardVersions()
case <-ctx.Done():
return ctx.Err()
}
@@ -83,3 +84,7 @@ func (service *CleanUpService) cleanUpTmpFiles() {
func (service *CleanUpService) deleteExpiredSnapshots() {
bus.Dispatch(&m.DeleteExpiredSnapshotsCommand{})
}
func (service *CleanUpService) deleteExpiredDashboardVersions() {
bus.Dispatch(&m.DeleteExpiredVersionsCommand{})
}