fix(region): maintain compatibility with webhook notify

This commit is contained in:
rainzm
2021-05-12 10:41:03 +08:00
parent 15abea72a2
commit 780a024e74
2 changed files with 2 additions and 2 deletions
+1 -1
View File
@@ -159,7 +159,7 @@ func (self *GuestCreateTask) OnDeployGuestDescComplete(ctx context.Context, obj
}
func (self *GuestCreateTask) notifyServerCreated(ctx context.Context, guest *models.SGuest) {
// notifyclient.NotifyWebhook(ctx, self.UserCred, guest, notifyclient.ActionCreate)
notifyclient.NotifyWebhook(ctx, self.UserCred, guest, notifyclient.ActionCreate)
guest.EventNotify(ctx, self.UserCred, notifyclient.ActionCreate)
}
+1 -1
View File
@@ -175,7 +175,7 @@ func (self *GuestRebuildRootTask) OnRebuildAllDisksComplete(ctx context.Context,
}
}
db.OpsLog.LogEvent(guest, db.ACT_REBUILD_ROOT, "", self.UserCred)
// notifyclient.NotifyWebhook(ctx, self.UserCred, guest, notifyclient.ActionRebuildRoot)
notifyclient.NotifyWebhook(ctx, self.UserCred, guest, notifyclient.ActionRebuildRoot)
guest.EventNotify(ctx, self.UserCred, notifyclient.ActionRebuildRoot)
self.SetStage("OnSyncStatusComplete", nil)
guest.StartSyncstatus(ctx, self.UserCred, self.GetTaskId())