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 93cbc487
authored
Nov 13, 2024
by
‘chizw’
Browse Files
Options
Browse Files
Tag
Download
Email Patches
Plain Diff
[+]补偿优化
1 parent
66acaf08
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
3 deletions
utils/ap_scheduler_util.py
utils/ap_scheduler_util.py
View file @
93cbc48
import
datetime
import
time
import
traceback
import
funasr_service
from
apscheduler.schedulers.blocking
import
BlockingScheduler
from
apscheduler.schedulers.background
import
BackgroundScheduler
...
...
@@ -27,7 +29,10 @@ 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'
,
hour
=
1
)
scheduler
.
start
()
try
:
scheduler
=
BackgroundScheduler
(
executors
=
executors
,
job_defaults
=
job_defaults
)
scheduler
.
add_job
(
funasr_service
.
task_compensate_send
,
'interval'
,
hour
=
1
)
scheduler
.
start
()
except
Exception
as
e
:
log
.
error
(
"funasr scheduler_start Exception: "
+
str
(
traceback
.
format_exc
()))
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