县长时间表较晚跑步
我有一个简单的“你好世界!”带有时间表的代码。但是它们总是开始迟到,黄色矩形放在图中,如屏幕截图所示( https:// https:// i .sstatic.net/yokpu.png )
有什么问题?为什么“晚期跑步”出现?以及如何使绿色矩形代替黄色?
from prefect import task, Flow
from datetime import timedelta
from prefect.schedules import IntervalSchedule
@task
def say_hello():
print("Hello, world!")
schedule = IntervalSchedule(interval=timedelta(minutes=1))
with Flow("Hello", schedule=schedule) as flow:
say_hello()
flow.register(project_name='Lesson')
flow.run()
I have a simple 'Hello world!' code with schedule. But they always start late and yellow rectangles are placed in the graph as shown in the screenshot (https://i.sstatic.net/yOKpU.png)
What is the problem? Why do 'late runs' appear? Аnd how to make green rectangles placed instead of yellow?
from prefect import task, Flow
from datetime import timedelta
from prefect.schedules import IntervalSchedule
@task
def say_hello():
print("Hello, world!")
schedule = IntervalSchedule(interval=timedelta(minutes=1))
with Flow("Hello", schedule=schedule) as flow:
say_hello()
flow.register(project_name='Lesson')
flow.run()
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
首先,较晚的跑步是什么?这些是计划运行的流程运行,但无法移至已提交和运行的状态 - 即,陷入计划状态的运行。这个问题最常见的是,由于流程运行配置和代理商设置的标签之间的标签之间的不匹配。 这个prectect tocultion topect a>深入研究了这个问题。 LMK阅读后有任何疑问。
First of all, what are late runs? Those are flow runs that are scheduled to run but can't move to a Submitted and Running states - i.e., runs that got stuck in a Scheduled state. This issue most commonly occurs due to a mismatch between labels set on your flow's run configuration and those set on your agent. This Prefect Discourse topic dives deeper into the issue. LMK if you have any questions after reading this.