python apscheduler - 跳过:达到最大运行实例数 [英] python apscheduler - skipped: maximum number of running instances reached

查看:90
本文介绍了python apscheduler - 跳过:达到最大运行实例数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我每秒都在使用 Python apscheduler(版本 3.0.1)执行一个函数

I am executing a function every second using Python apscheduler (version 3.0.1)

代码:

scheduler = BackgroundScheduler()
scheduler.add_job(runsync, 'interval', seconds=1)
scheduler.start()

它大部分时间都运行良好,但有时我会收到此警告:

It's working fine most of the time but sometimes I get this warning:

WARNING:apscheduler.scheduler:Execution of job "runsync (trigger: interval[0:00:01], next run at: 2015-12-01 11:50:42 UTC)" skipped: maximum number of running instances reached (1)

1.这是执行此方法的正确方法吗?

1.Is this the correct way to execute this method?

2.这个警告是什么意思?是否会影响函数内部任务的执行?

2.What does this warning mean? Does it affect the execution of tasks inside the function in anyway?

3.如何处理?

推荐答案

这意味着任务花费的时间超过一秒,并且默认情况下,给定的作业只允许一个并发执行.在不知道任务是什么的情况下,我无法告诉你如何处理这个问题.

It means that the task is taking longer than one second and by default only one concurrent execution is allowed for a given job. I cannot tell you how to handle this without knowing what the task is about.

这篇关于python apscheduler - 跳过:达到最大运行实例数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆