mirror of
https://github.com/yunionio/cloudpods.git
synced 2026-08-30 17:13:08 +08:00
fix(cloudevent): allow disable sync cloudevent (#14448)
This commit is contained in:
@@ -256,6 +256,9 @@ func (manager *SCloudproviderManager) syncCloudeventTask(ctx context.Context, us
|
||||
}
|
||||
|
||||
func (manager *SCloudproviderManager) SyncCloudeventTask(ctx context.Context, userCred mcclient.TokenCredential, isStart bool) {
|
||||
if options.Options.DisableSyncCloudEvent {
|
||||
return
|
||||
}
|
||||
err := manager.syncCloudeventTask(ctx, userCred)
|
||||
if err != nil {
|
||||
log.Errorf("syncCloudeventTask error: %v", err)
|
||||
|
||||
@@ -23,6 +23,8 @@ type CloudeventOptions struct {
|
||||
CloudproviderSyncIntervalMinutes int `help:"frequency to sync region cloudprovider task" default:"15"`
|
||||
CloudeventSyncIntervalHours int `help:"frequency to sync cloud event task" default:"1"`
|
||||
|
||||
DisableSyncCloudEvent bool `help:"disable sync cloudevent" default:"false"`
|
||||
|
||||
SyncWithReadEvent bool `help:"sync read operation events" default:"false"`
|
||||
OneSyncForHours int `help:"Onece sync for hours" default:"1"`
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user