Skip to content

Commit

Permalink
optimization: 捕获主机操作类任务灰度异常 (closed TencentBlueKing#1616)
Browse files Browse the repository at this point in the history
  • Loading branch information
wyyalt committed Jun 14, 2023
1 parent 5a36cca commit b177acd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions apps/node_man/serializers/job.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
from apps.core.gray.handlers import GrayHandler
from apps.core.gray.tools import GrayTools
from apps.core.ipchooser.tools.base import HostQuerySqlHelper
from apps.exceptions import ValidationError
from apps.exceptions import ApiError, ValidationError
from apps.node_man import constants, models, tools
from apps.node_man.handlers import validator
from apps.node_man.handlers.cmdb import CmdbHandler
Expand Down Expand Up @@ -346,7 +346,7 @@ def validate(self, attrs):
gse_v2_cloud_host_ids, bk_biz_scope, is_biz_gray=False, rollback=False
)
GrayHandler.activate(host_nodes=update_result["host_nodes"], rollback=False, only_status=True)
except Exception:
except ApiError:
pass

# 业务已进入灰度,主机接入点重定向到 V2
Expand All @@ -365,7 +365,7 @@ def validate(self, attrs):
gse_v2_default_area_host_ids, gray_bk_biz_scope, is_biz_gray=False, rollback=False
)
GrayHandler.activate(host_nodes=update_result["host_nodes"], rollback=False, only_status=True)
except Exception:
except ApiError:
pass
return attrs

Expand Down

0 comments on commit b177acd

Please sign in to comment.