Merge pull request #10117 from wanyaoqi/fix/wyq/add-option-auto-reconcile-backup-servers

fix(region): add option auto reconcile backup servers
This commit is contained in:
Zexi Li
2021-02-02 20:09:13 +08:00
committed by GitHub
2 changed files with 5 additions and 2 deletions
+2 -1
View File
@@ -153,7 +153,8 @@ type ComputeOptions struct {
SyncStorageCapacityUsedIntervalMinutes int `help:"interval sync storage capacity used" default:"20"`
LockStorageFromCachedimage bool `help:"must use storage in where selected cachedimage when creating vm"`
SyncExtDiskSnapshotIntervalMinutes int `help:"sync snapshot for external disk" default:"20"`
SyncExtDiskSnapshotIntervalMinutes int `help:"sync snapshot for external disk" default:"20"`
AutoReconcileBackupServers bool `help:"auto reconcile backup servers" default:"false"`
SCapabilityOptions
SASControllerOptions
+3 -1
View File
@@ -139,7 +139,9 @@ func StartService() {
cron.AddJobAtIntervalsWithStartRun("CalculateInfrasQuotaUsages", time.Duration(opts.CalculateQuotaUsageIntervalSeconds)*time.Second, models.InfrasQuotaManager.CalculateQuotaUsages, true)
cron.AddJobAtIntervalsWithStartRun("AutoSyncCloudaccountTask", time.Duration(opts.CloudAutoSyncIntervalSeconds)*time.Second, models.CloudaccountManager.AutoSyncCloudaccountTask, true)
cron.AddJobAtIntervalsWithStartRun("ReconcileBackupGuests", time.Duration(opts.ReconcileGuestBackupIntervalSeconds)*time.Second, models.GuestManager.ReconcileBackupGuests, true)
if opts.AutoReconcileBackupServers {
cron.AddJobAtIntervalsWithStartRun("ReconcileBackupGuests", time.Duration(opts.ReconcileGuestBackupIntervalSeconds)*time.Second, models.GuestManager.ReconcileBackupGuests, true)
}
cron.AddJobAtIntervalsWithStartRun("SyncCapacityUsedForEsxiStorage", time.Duration(opts.SyncStorageCapacityUsedIntervalMinutes)*time.Minute, models.StorageManager.SyncCapacityUsedForEsxiStorage, true)