Skip to content

Commit

Permalink
Merge pull request #978 from ioito/hotfix/qx-qcloud-mongodb-processin…
Browse files Browse the repository at this point in the history
…g-status

fix(qcloud): mongodb status
  • Loading branch information
ioito authored Jun 4, 2024
2 parents dd17647 + e1cb562 commit 8be3013
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions pkg/apis/compute/mongodb_const.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ package compute
const (
MONGO_DB_STATUS_CREATING = "creating"
MONGO_DB_STATUS_RUNNING = "running"
MONGO_DB_STATUS_PROCESSING = "processing"
MONGO_DB_STATUS_DEPLOY = "deploy"
MONGO_DB_STATUS_CHANGE_CONFIG = "change_config"
MONGO_DB_STATUS_DELETING = "deleting"
Expand Down
4 changes: 3 additions & 1 deletion pkg/multicloud/qcloud/mongodb.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,8 +115,10 @@ func (self *SMongoDB) GetName() string {

func (self *SMongoDB) GetStatus() string {
switch self.Status {
case 0, 1:
case 0:
return api.MONGO_DB_STATUS_CREATING
case 1:
return api.MONGO_DB_STATUS_PROCESSING
case 2:
return api.MONGO_DB_STATUS_RUNNING
case -2, -3:
Expand Down

0 comments on commit 8be3013

Please sign in to comment.