mirror of
https://github.com/jxxghp/MoviePilot.git
synced 2026-08-29 20:17:13 +08:00
34 lines
603 B
Python
34 lines
603 B
Python
from app.application.scheduling import register_scheduler_class
|
|
from app.scheduler import Scheduler
|
|
|
|
# 导入期即向 application 门面注册调度器类,保证工具调用时不依赖静态边。
|
|
register_scheduler_class(Scheduler)
|
|
|
|
|
|
def init_scheduler():
|
|
"""
|
|
初始化定时器
|
|
"""
|
|
Scheduler().init()
|
|
|
|
|
|
def stop_scheduler():
|
|
"""
|
|
停止定时器
|
|
"""
|
|
Scheduler().stop()
|
|
|
|
|
|
def restart_scheduler():
|
|
"""
|
|
重启定时器
|
|
"""
|
|
Scheduler().init()
|
|
|
|
|
|
def init_plugin_scheduler():
|
|
"""
|
|
初始化插件定时器
|
|
"""
|
|
Scheduler().init_plugin_jobs()
|