Skip to content

Commit

Permalink
fix: api 插件超时时间支持任务模块级别配置 升级pre-commit msg 版本 #87
Browse files Browse the repository at this point in the history
  • Loading branch information
ZC-A committed Jan 8, 2025
1 parent f60035e commit 119e1d7
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ repos:
- id: flake8
language_version: python3
- repo: https://github.com/alessandrojcm/commitlint-pre-commit-hook
rev: v2.2.0
rev: v9.20.0
hooks:
- id: commitlint
stages: [ commit-msg ]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ def _dispatch_schedule_polling(self, data, parent_data, callback_data=None):
method="get",
data=api_data,
headers=headers,
timeout=settings.BKAPP_ENGINE_PLUGIN_TIMEOUT,
timeout=settings.BKAPP_API_PLUGIN_REQUEST_TIMEOUT,
)
except Exception as e:
message = handle_plain_log("[uniform_api polling error] url request failed: {}".format(e))
Expand Down
2 changes: 1 addition & 1 deletion env.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
BKAPP_DEFAULT_ENGINE_MODULE_ENTRY = os.getenv("BKAPP_DEFAULT_ENGINE_MODULE_ENTRY", "")

# 默认引擎插件超时时间
BKAPP_ENGINE_PLUGIN_TIMEOUT = os.getenv("BKAPP_ENGINE_PLUGIN_TIMEOUT", 30)
BKAPP_API_PLUGIN_REQUEST_TIMEOUT = os.getenv("BKAPP_API_PLUGIN_REQUEST_TIMEOUT", 30)

CALLBACK_KEY = os.getenv("BKFLOW_DEFAULT_CALLBACK_KEY", "").encode("utf-8")

Expand Down
2 changes: 1 addition & 1 deletion module_settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ def check_engine_admin_permission(request, *args, **kwargs):

PIPELINE_ENGINE_ADMIN_API_PERMISSION = "module_settings.check_engine_admin_permission"

BKAPP_ENGINE_PLUGIN_TIMEOUT = env.BKAPP_ENGINE_PLUGIN_TIMEOUT
BKAPP_API_PLUGIN_REQUEST_TIMEOUT = env.BKAPP_API_PLUGIN_REQUEST_TIMEOUT

INSTALLED_APPS += (
"rest_framework",
Expand Down

0 comments on commit 119e1d7

Please sign in to comment.