Commit 1d5ed18d by ‘chizw’

[+]补偿优化

1 parent 07c76a7d
......@@ -92,9 +92,9 @@ def select_time_out_task():
sql = (
"select id,task_id,file_url,task_status from ali_asr_model_res aamr where aamr.del_flag = 0 "
"and aamr.output_data is null and aamr.execute_process_name is not null and exception_limit < 3 "
"and aamr.updated_time < TIMESTAMPADD(MINUTE, -%s, NOW());"
"and aamr.updated_time < TIMESTAMPADD(HOUR, -%s, NOW());"
)
return pool.select_all(sql, (30))
return pool.select_all(sql, (2))
def select_voice_data(id):
......@@ -147,13 +147,13 @@ and ibr.created_date >= %s
# and aamr.task_id = '1acddf88-69c8-11ef-b08a-00163e14f7ff'
group by ibr.id order by ibr.created_date desc"""
)
return pool.select_all(sql, (created_date,'%"role": 2%'))
return pool.select_all(sql, (created_date, '%"role": 2%'))
def select_reception_material_data(table_name: str,config_id):
def select_reception_material_data(table_name: str, config_id):
sql = (
f"""select * from {table_name} t
where
t.deleted_flag = 'N' and t.merchant_config_id = %s"""
)
return pool.select_all(sql, (config_id))
......@@ -28,6 +28,6 @@ def job_func():
def scheduler_start():
log.info("scheduler_starting...")
scheduler = BackgroundScheduler(executors=executors, job_defaults=job_defaults)
scheduler.add_job(funasr_service.task_compensate_send, 'interval', minutes=30)
scheduler.add_job(funasr_service.task_compensate_send, 'interval', hour=1)
scheduler.start()
log.info("scheduler_start success")
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!