fill LastSuccessfulAttemptStartTime if possible

This commit is contained in:
Max Erenberg 2023-04-04 20:56:20 -04:00 committed by Mirror
parent 900ac27d63
commit 586520aa55
1 changed files with 5 additions and 0 deletions

View File

@ -316,6 +316,11 @@ func LoadConfig(configPath string, doneChan chan SyncResult, stopChan chan struc
err = ini.MapTo(&repo.State, repo.StateFile)
panicIfErr(err)
// fill LastSuccessfulAttemptStartTime if we have the data
if repo.State.LastSuccessfulAttemptStartTime == 0 && repo.State.LastAttemptExit == SUCCESS {
repo.State.LastSuccessfulAttemptStartTime = repo.State.LastAttemptStartTime
}
newRepos = append(newRepos, &repo)
}