未知
pyres-scheduler的Python项目详细描述
包装pyres和apscheduler,以便可以异步调度任务
示例用法:
from pyres import resq
from pyres_scheduler import pyresscheduler
from pyres_scheduler.decorators导入周期性任务,timedelta
pyres sched=pyresscheduler()
resque=resq()
pyres sched.add_resque(resque)
@周期性任务(优先级='high',运行'u every=timedelta(seconds=60))
def my_task():
打印'executing task'
pyres_sched.start()
pyres_sched.add_job(my_task)
函数必须可用于导入,以便将它们排队(即,您不能将在交互式
python提示符中定义的函数排队,它们必须被保存并可供pyres\u工作人员访问)
示例用法:
from pyres import resq
from pyres_scheduler import pyresscheduler
from pyres_scheduler.decorators导入周期性任务,timedelta
pyres sched=pyresscheduler()
resque=resq()
pyres sched.add_resque(resque)
@周期性任务(优先级='high',运行'u every=timedelta(seconds=60))
def my_task():
打印'executing task'
pyres_sched.start()
pyres_sched.add_job(my_task)
函数必须可用于导入,以便将它们排队(即,您不能将在交互式
python提示符中定义的函数排队,它们必须被保存并可供pyres\u工作人员访问)