测试通过

This commit is contained in:
mark.tian
2025-12-11 12:45:58 +08:00
parent b2320cdfb7
commit ba3c93c896
2 changed files with 2 additions and 8 deletions

View File

@@ -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'
}
},
}

View File

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