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}")