Skip to content

Commit

Permalink
feat: 依赖包升级 (closed TencentBlueKing#2160)
Browse files Browse the repository at this point in the history
  • Loading branch information
wyyalt committed Apr 25, 2024
1 parent dcd5640 commit 3571a5e
Showing 1 changed file with 10 additions and 7 deletions.
17 changes: 10 additions & 7 deletions apps/node_man/apps.py
Original file line number Diff line number Diff line change
Expand Up @@ -113,12 +113,15 @@ def init_settings(cls):
key=GlobalSettings.KeyEnum.ENABLE_NOTICE_CENTER.value, defaults=dict(v_json=False)
)
enable_notice_center: bool = obj.v_json
if not enable_notice_center:
response = api_call(
api_method="register_application", success_message="注册平台成功", error_message="注册平台异常", success_code=201
)
if response.get("result") is True:
GlobalSettings.update_config(key=GlobalSettings.KeyEnum.ENABLE_NOTICE_CENTER.value, value=True)
enable_notice_center: bool = True
# if not enable_notice_center:
# try:
# response = api_call(
# api_method="register_application", success_message="注册平台成功", error_message="注册平台异常", success_code=201
# )
# if response.get("result") is True:
# GlobalSettings.update_config(key=GlobalSettings.KeyEnum.ENABLE_NOTICE_CENTER.value, value=True)
# enable_notice_center: bool = True
# except Exception as e:
# pass

settings.ENABLE_NOTICE_CENTER = enable_notice_center

0 comments on commit 3571a5e

Please sign in to comment.