Abort restarts if updated version is rolled back

This commit is contained in:
Daniel
2022-08-05 16:33:31 +02:00
parent 47cb67e032
commit 60230c0d6d
3 changed files with 75 additions and 26 deletions

View File

@@ -65,6 +65,8 @@ const (
updateFailed = "updates:failed"
updateSuccess = "updates:success"
updateTaskRepeatDuration = 1 * time.Hour
)
func init() {
@@ -157,7 +159,7 @@ func start() error {
if !disableTaskSchedule {
updateTask.
Repeat(1 * time.Hour).
Repeat(updateTaskRepeatDuration).
MaxDelay(30 * time.Minute)
}