禁用外呼task启动

This commit is contained in:
mark.tian
2025-12-10 08:11:24 +08:00
parent 34520d4113
commit 3fbbf1285c
3 changed files with 1 additions and 7 deletions

View File

@@ -41,7 +41,6 @@ engine = create_engine(
)
@celery_app.task(bind=True, name='push_data_to_dtc')
@conditional_task(enabled=settings.task_enabled)
def push_data_to_dtc_task(self):
"""
推送数据给DTC的Celery任务
@@ -222,6 +221,7 @@ def push_data_to_dtc_task(self):
@celery_app.task(bind=True, name='call_api', max_retries=None)
@conditional_task(enabled=False)
def execute_call_api_task(self):
"""遍历API配置文件中的所有API信息并调用接口"""
current_time = datetime.now().strftime('%Y-%m-%d %H:%M:%S')

View File

@@ -18,9 +18,6 @@ class Settings(BaseSettings):
celery_timezone: str = "Asia/Shanghai"
celery_enable_utc: bool = False
# 任务配置
task_enabled: bool = False # 是否启用任务
# Flower监控配置
flower_enabled: bool = True # 是否启用Flower监控
flower_url: str = "http://localhost:5555" # Flower访问URL