fix: start sync status (#22442)

Co-authored-by: Qiu Jian <qiujian@yunionyun.com>
This commit is contained in:
Jian Qiu
2025-04-20 18:06:35 +08:00
committed by GitHub
co-authored by Qiu Jian
parent 515fb7b424
commit e2268e8ea3
2 changed files with 5 additions and 0 deletions
+2
View File
@@ -48,6 +48,8 @@ const (
STATUS_UPDATE_TAGS = "update_tags"
STATUS_UPDATE_TAGS_FAILED = "update_tags_fail"
STATUS_START_SYNC_STATUS = "start_sync_status"
STATUS_SYNC_STATUS = "sync_status"
STATUS_DELETING = "deleting"
STATUS_DELETE_FAILED = "delete_failed"
+3
View File
@@ -1686,6 +1686,9 @@ func (self *SGuest) fixFakeServerInfo(ctx context.Context, userCred mcclient.Tok
}
func (self *SGuest) StartSyncstatus(ctx context.Context, userCred mcclient.TokenCredential, parentTaskId string) error {
if len(parentTaskId) == 0 {
self.SetStatus(ctx, userCred, apis.STATUS_START_SYNC_STATUS, "")
}
driver, err := self.GetDriver()
if err != nil {
return errors.Wrapf(err, "GetDriver")