Skip to content
Toggle navigation
Projects
Groups
Snippets
Help
eshiled-new
/
funasr_web
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit 1d5ed18d
authored
Nov 05, 2024
by
‘chizw’
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]补偿优化
1 parent
07c76a7d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
6 deletions
mysql_service/funasr_db.py
utils/ap_scheduler_util.py
mysql_service/funasr_db.py
View file @
1d5ed18
...
...
@@ -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
))
utils/ap_scheduler_util.py
View file @
1d5ed18
...
...
@@ -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"
)
Write
Preview
Markdown
is supported
Attach a file
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to post a comment