Merge pull request #10521 from ioito/hotfix/qx-auto-sync

fix: account auto sync time
This commit is contained in:
Zexi Li
2021-03-29 12:13:26 +08:00
committed by GitHub
+3
View File
@@ -1829,6 +1829,9 @@ func (account *SCloudaccount) needSync() bool {
if time.Now().Sub(account.LastSyncEndAt) > time.Duration(account.getSyncIntervalSeconds())*time.Second {
return true
}
if account.EnableAutoSync && !account.LastAutoSync.IsZero() && time.Now().Sub(account.LastAutoSync) > time.Duration(account.getSyncIntervalSeconds()-1)*time.Second {
return true
}
return false
}