Skip to content

Commit 8356215

Browse files
author
Xinkai Yi
committed
fix: pre-commit 调试代码格式规范 --story=130029401
1 parent 461487f commit 8356215

1 file changed

Lines changed: 7 additions & 14 deletions

File tree

  • runtime/bk-plugin-runtime/bk_plugin_runtime/config

runtime/bk-plugin-runtime/bk_plugin_runtime/config/default.py

Lines changed: 7 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,15 @@
1414
import urllib
1515
from urllib.parse import urlparse
1616

17-
1817
from blueapps.conf.default_settings import * # noqa
1918
from blueapps.conf.log import get_logging_config_dict
2019

21-
2220
BKPAAS_ENVIRONMENT = os.getenv("BKPAAS_ENVIRONMENT", "dev")
2321
# 默认关闭可观测性
2422
ENABLE_OTEL_METRICS = os.getenv("ENABLE_METRICS", False)
2523

2624
# 请在这里加入你的自定义 APP
2725
INSTALLED_APPS += ( # noqa
28-
2926
"bk_plugin_framework.runtime.loghub",
3027
"bk_plugin_framework.runtime.schedule",
3128
"bk_plugin_framework.runtime.callback",
@@ -42,12 +39,8 @@
4239
if BKPAAS_ENVIRONMENT == "dev":
4340
INSTALLED_APPS += ("bk_plugin_framework.services.debug_panel",) # noqa
4441

45-
from bk_plugin_framework.runtime.callback.celery import ( # noqa
46-
queues as callback_queues,
47-
)
48-
from bk_plugin_framework.runtime.schedule.celery import ( # noqa
49-
queues as schedule_queues,
50-
)
42+
from bk_plugin_framework.runtime.callback.celery import queues as callback_queues # noqa
43+
from bk_plugin_framework.runtime.schedule.celery import queues as schedule_queues # noqa
5144

5245
CELERY_QUEUES = schedule_queues.CELERY_QUEUES
5346
CELERY_QUEUES.extend(callback_queues.CELERY_QUEUES)
@@ -177,9 +170,10 @@
177170

178171
ROOT_URLCONF = "bk_plugin_runtime.urls"
179172

180-
from bk_plugin_framework.runtime.schedule.celery.beat import SCHEDULE # noqa
181173
from blueapps.core.celery import celery_app # noqa
182174

175+
from bk_plugin_framework.runtime.schedule.celery.beat import SCHEDULE # noqa
176+
183177
celery_app.conf.beat_schedule = SCHEDULE
184178

185179

@@ -223,6 +217,8 @@ def logging_addition_settings(logging_dict):
223217
{"format": logging_dict["formatters"]["verbose"][kw].strip() + " [trace_id]: %(trace_id)s"}
224218
)
225219
break
220+
221+
226222
# drf settings
227223
REST_FRAMEWORK = {
228224
"DEFAULT_AUTHENTICATION_CLASSES": [
@@ -258,16 +254,13 @@ def logging_addition_settings(logging_dict):
258254
BK_APIGW_STAGE_BACKEND_SUBPATH = app_subpath
259255

260256

261-
262257
# while deploy app on staging env, it would sync to the stage=stag of the gateway
263258
# while deploy app on production env, it would sync to the stage=prod of the gateway
264259
BK_APIGW_STAGE_NAME = bkpaas_environment
265260
BK_APIGW_STAGE_DESCRIPTION = "生产环境" if bkpaas_environment == "prod" else "预发布环境"
266261
BK_APIGW_STAGE_DESCRIPTION_EN = "Production Env" if bkpaas_environment == "prod" else "Staging Env"
267262
# 声明网关不同环境的环境变量
268-
stag_env_vars = {
269-
"foo": "bar"
270-
}
263+
stag_env_vars = {"foo": "bar"}
271264
prod_env_vars = {
272265
# "foo": "bar"
273266
}

0 commit comments

Comments
 (0)