11 lines
398 B
Python
11 lines
398 B
Python
from celery_app import celery_app
|
|
from flask_app.general.通义千问long import qianwen_long
|
|
|
|
|
|
@celery_app.task(name='tasks.process_qianwen_long')
|
|
def process_qianwen_long(self, file_id, user_query):
|
|
try:
|
|
return qianwen_long(file_id, user_query)
|
|
except Exception as exc:
|
|
# 如果发生异常,重试任务
|
|
raise self.retry(exc=exc, countdown=60) # 60 秒后重试 |