|
14 | 14 | import urllib |
15 | 15 | from urllib.parse import urlparse |
16 | 16 |
|
17 | | - |
18 | 17 | from blueapps.conf.default_settings import * # noqa |
19 | 18 | from blueapps.conf.log import get_logging_config_dict |
20 | 19 |
|
21 | | - |
22 | 20 | BKPAAS_ENVIRONMENT = os.getenv("BKPAAS_ENVIRONMENT", "dev") |
23 | 21 | # 默认关闭可观测性 |
24 | 22 | ENABLE_OTEL_METRICS = os.getenv("ENABLE_METRICS", False) |
25 | 23 |
|
26 | 24 | # 请在这里加入你的自定义 APP |
27 | 25 | INSTALLED_APPS += ( # noqa |
28 | | - |
29 | 26 | "bk_plugin_framework.runtime.loghub", |
30 | 27 | "bk_plugin_framework.runtime.schedule", |
31 | 28 | "bk_plugin_framework.runtime.callback", |
|
42 | 39 | if BKPAAS_ENVIRONMENT == "dev": |
43 | 40 | INSTALLED_APPS += ("bk_plugin_framework.services.debug_panel",) # noqa |
44 | 41 |
|
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 |
51 | 44 |
|
52 | 45 | CELERY_QUEUES = schedule_queues.CELERY_QUEUES |
53 | 46 | CELERY_QUEUES.extend(callback_queues.CELERY_QUEUES) |
|
177 | 170 |
|
178 | 171 | ROOT_URLCONF = "bk_plugin_runtime.urls" |
179 | 172 |
|
180 | | -from bk_plugin_framework.runtime.schedule.celery.beat import SCHEDULE # noqa |
181 | 173 | from blueapps.core.celery import celery_app # noqa |
182 | 174 |
|
| 175 | +from bk_plugin_framework.runtime.schedule.celery.beat import SCHEDULE # noqa |
| 176 | + |
183 | 177 | celery_app.conf.beat_schedule = SCHEDULE |
184 | 178 |
|
185 | 179 |
|
@@ -223,6 +217,8 @@ def logging_addition_settings(logging_dict): |
223 | 217 | {"format": logging_dict["formatters"]["verbose"][kw].strip() + " [trace_id]: %(trace_id)s"} |
224 | 218 | ) |
225 | 219 | break |
| 220 | + |
| 221 | + |
226 | 222 | # drf settings |
227 | 223 | REST_FRAMEWORK = { |
228 | 224 | "DEFAULT_AUTHENTICATION_CLASSES": [ |
@@ -258,16 +254,13 @@ def logging_addition_settings(logging_dict): |
258 | 254 | BK_APIGW_STAGE_BACKEND_SUBPATH = app_subpath |
259 | 255 |
|
260 | 256 |
|
261 | | - |
262 | 257 | # while deploy app on staging env, it would sync to the stage=stag of the gateway |
263 | 258 | # while deploy app on production env, it would sync to the stage=prod of the gateway |
264 | 259 | BK_APIGW_STAGE_NAME = bkpaas_environment |
265 | 260 | BK_APIGW_STAGE_DESCRIPTION = "生产环境" if bkpaas_environment == "prod" else "预发布环境" |
266 | 261 | BK_APIGW_STAGE_DESCRIPTION_EN = "Production Env" if bkpaas_environment == "prod" else "Staging Env" |
267 | 262 | # 声明网关不同环境的环境变量 |
268 | | -stag_env_vars = { |
269 | | - "foo": "bar" |
270 | | -} |
| 263 | +stag_env_vars = {"foo": "bar"} |
271 | 264 | prod_env_vars = { |
272 | 265 | # "foo": "bar" |
273 | 266 | } |
|
0 commit comments