From 780a024e7442e307341fb098f6dc18eb962d753a Mon Sep 17 00:00:00 2001 From: rainzm Date: Wed, 12 May 2021 10:35:27 +0800 Subject: [PATCH] fix(region): maintain compatibility with webhook notify --- pkg/compute/tasks/guest_create_task.go | 2 +- pkg/compute/tasks/guest_rebuild_root_task.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/pkg/compute/tasks/guest_create_task.go b/pkg/compute/tasks/guest_create_task.go index ef41d3bd26..48189e399b 100644 --- a/pkg/compute/tasks/guest_create_task.go +++ b/pkg/compute/tasks/guest_create_task.go @@ -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) } diff --git a/pkg/compute/tasks/guest_rebuild_root_task.go b/pkg/compute/tasks/guest_rebuild_root_task.go index 6ae7488672..4c09de9972 100644 --- a/pkg/compute/tasks/guest_rebuild_root_task.go +++ b/pkg/compute/tasks/guest_rebuild_root_task.go @@ -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())