Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: 修复环境变量问题 #7545 #7617

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions config/default.py
Original file line number Diff line number Diff line change
Expand Up @@ -888,3 +888,6 @@ def check_engine_admin_permission(request, *args, **kwargs):
ENABLE_BK_CHAT_CHANNEL = env.ENABLE_BK_CHAT_CHANNEL
# bk_chat路由
BK_CHAT_API_ENTRY = env.BK_CHAT_API_ENTRY
# bk_chat通知渠道过滤app
BK_CHAT_APP_CODE = env.BK_CHAT_APP_CODE
BK_CHAT_APP_SECRET_KEY = env.BK_CHAT_APP_SECRET_KEY
3 changes: 3 additions & 0 deletions env.py
Original file line number Diff line number Diff line change
Expand Up @@ -158,3 +158,6 @@
ENABLE_BK_CHAT_CHANNEL = False if os.getenv("BKAPP_ENABLE_BK_CHAT_CHANNEL") is None else True
# bk_chat通知路由
BK_CHAT_API_ENTRY = os.getenv("BK_CHAT_API_ENTRY", "")
# bk_chat通知渠道过滤app
BK_CHAT_APP_CODE = os.getenv("BK_CHAT_APP_CODE", os.getenv("BKPAAS_APP_ID"))
BK_CHAT_APP_SECRET_KEY = os.getenv("BK_CHAT_APP_SECRET_KEY", os.getenv("BKPAAS_APP_SECRET"))
2 changes: 1 addition & 1 deletion gcloud/shortcuts/message/send_msg.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ def send(self, executor, notify_type, notify_info, receivers, title, content, em
return True

def send_bkchat(self, notify, content):
params = {"bk_app_code": settings.APP_CODE, "bk_app_secret": settings.SECRET_KEY}
params = {"bk_app_code": settings.BK_CHAT_APP_CODE, "bk_app_secret": settings.BK_CHAT_APP_SECRET_KEY}

data = {
"im": "WEWORK",
Expand Down
Loading