11.25 qianwen-long
This commit is contained in:
parent
a2bd20eb0d
commit
0a0770d5b4
@ -19,3 +19,4 @@ celery_app.conf.update(
|
||||
timezone='UTC', # 设置时区(可根据需要修改)
|
||||
enable_utc=True # 确保 UTC 时间生效
|
||||
)
|
||||
celery_app.autodiscover_tasks(['flask_app.task'])
|
@ -1,6 +1,6 @@
|
||||
# flask_project/flask_app/routes.py
|
||||
from flask import request, jsonify
|
||||
from flask_app.tasks import process_qianwen_long
|
||||
from flask_app.task import process_qianwen_long
|
||||
|
||||
def register_routes(app):
|
||||
@app.route('/api/qianwen_long', methods=['POST'])
|
||||
|
@ -7,7 +7,9 @@ from flask_app.general.通义千问long import qianwen_long
|
||||
name='flask_app.task.process_qianwen_long',
|
||||
bind=True,
|
||||
soft_time_limit=600, # 10分钟后发出超时信号
|
||||
time_limit=660
|
||||
time_limit=660,
|
||||
max_retries=3, # 最大重试次数
|
||||
default_retry_delay=60 # 重试延迟时间(秒)
|
||||
)
|
||||
def process_qianwen_long(self, file_id, user_query):
|
||||
try:
|
Loading…
x
Reference in New Issue
Block a user