From ba3c93c896ff351a82fc08dcda017cdd8100cd16 Mon Sep 17 00:00:00 2001 From: "mark.tian" Date: Thu, 11 Dec 2025 12:45:58 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B5=8B=E8=AF=95=E9=80=9A=E8=BF=87?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/api_config.py | 7 ++----- app/celery_tasks.py | 3 --- 2 files changed, 2 insertions(+), 8 deletions(-) diff --git a/app/api_config.py b/app/api_config.py index 383a9e8..2247eff 100644 --- a/app/api_config.py +++ b/app/api_config.py @@ -44,17 +44,14 @@ API_CONFIG = { API_CONFIG = { 'task_test': { - 'url': 'https://httpbin.org/post', - 'method': 'POST', + 'url': 'http://localhost:8000/health', + 'method': 'GET', 'headers': { 'Content-Type': 'application/json', 'User-Agent': 'Celery-Task/1.0' }, 'timeout': 30, 'body': { - 'test': 'data', - 'timestamp': '2025-12-11T10:00:00Z', - 'source': 'api_config_test' } }, } diff --git a/app/celery_tasks.py b/app/celery_tasks.py index 84bc99c..98b67b8 100644 --- a/app/celery_tasks.py +++ b/app/celery_tasks.py @@ -290,9 +290,6 @@ def execute_call_api_task(self): # 从环境变量获取Authorization并添加到headers if settings.api_authorization_token: headers['Authorization'] = settings.api_authorization_token - else: - logger.warning(f"⚠️ API Authorization Token 未配置,跳过API调用: {api_key}") - continue try: logger.info(f"正在调用任务API: {method} {call_url}")