11.25 qianwen-long
This commit is contained in:
parent
6b64596903
commit
40151bb5fc
@ -49,4 +49,4 @@ def create_app():
|
|||||||
#TODO:接口设置排队
|
#TODO:接口设置排队
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
app = create_app()
|
app = create_app()
|
||||||
app.run(debug=True, host='0.0.0.0', port=5001)
|
app.run(debug=True, host='0.0.0.0', port=5000)
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
from celery_app import celery_app
|
from flask_app.celery_app import celery_app
|
||||||
from flask_app.general.通义千问long import qianwen_long
|
from flask_app.general.通义千问long import qianwen_long
|
||||||
|
|
||||||
|
|
||||||
@ -7,9 +7,9 @@ from flask_app.general.通义千问long import qianwen_long
|
|||||||
soft_time_limit=600, # 10分钟后发出超时信号
|
soft_time_limit=600, # 10分钟后发出超时信号
|
||||||
time_limit=660
|
time_limit=660
|
||||||
)
|
)
|
||||||
def process_qianwen_long(self, file_id, user_query):
|
def process_qianwen_long(file_id, user_query):
|
||||||
try:
|
try:
|
||||||
return qianwen_long(file_id, user_query)
|
return qianwen_long(file_id, user_query)
|
||||||
except Exception as exc:
|
except Exception as exc:
|
||||||
# 如果发生异常,重试任务
|
# 如果发生异常,重试任务
|
||||||
raise self.retry(exc=exc, countdown=60) # 60 秒后重试
|
print("no")
|
Loading…
x
Reference in New Issue
Block a user