- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在使用 airbnb 的 Airflow ,我创建了一个简单的任务,如下所示。但是,即使我将间隔设置为每小时或任何其他间隔,调度程序仍会继续运行任务。我注意到的另一件事是,如果我将调度间隔设置为“@once”,它永远不会运行 dag。
我遵循了这里的约定 http://airflow.readthedocs.org/en/latest/scheduler.html#dag-runs
我正在使用的简单 dag。
"""
Code that goes along with the Airflow located at:
http://airflow.readthedocs.org/en/latest/tutorial.html
"""
from airflow import DAG
from airflow.operators import BashOperator
from datetime import datetime, timedelta
default_args = {
'owner': 'airflow',
'depends_on_past': False,
'start_date': datetime(2016, 1, 5),
'email': ['airflow@airflow.com'],
'email_on_failure': False,
'email_on_retry': False,
'retries': 1,
'retry_delay': timedelta(minutes=5),
# 'queue': 'bash_queue',
# 'pool': 'backfill',
# 'priority_weight': 10,
# 'end_date': datetime(2016, 1, 1),
}
dag = DAG(
'schedule_test', default_args=default_args, schedule_interval='@hourly')
# t1, t2 and t3 are examples of tasks created by instatiating operators
t1 = BashOperator(
task_id='print_date',
bash_command='date',
dag=dag)
调度程序输出以供引用。如您所见,它一直在一遍又一遍地运行,但在我的 dag 中,我有 schedule_interval='@hourly'
2016-01-06 20:34:37,266 - root - INFO - Starting the scheduler
2016-01-06 20:34:37,267 - root - INFO - Filling up the DagBag from /usr/local/airflow/dags
2016-01-06 20:34:37,267 - root - INFO - Importing /usr/local/airflow/dags/test.py
2016-01-06 20:34:37,272 - root - INFO - Loaded DAG <DAG: schedule_test>
2016-01-06 20:34:37,281 - root - INFO - Prioritizing 0 queued jobs
2016-01-06 20:34:37,288 - root - INFO - Importing /usr/local/airflow/dags/test.py
2016-01-06 20:34:37,291 - root - INFO - Loaded DAG <DAG: schedule_test>
2016-01-06 20:34:37,318 - root - INFO - Checking state for <DagRun schedule_test @ 2016-01-06 00:00:00: scheduled__2016-01-06T00:00:00, externally triggered: False>
2016-01-06 20:34:37,321 - root - INFO - Getting list of tasks to skip for active runs.
2016-01-06 20:34:37,323 - root - INFO - Checking dependencies on 1 tasks instances, minus 0 skippable ones
2016-01-06 20:34:37,326 - root - INFO - Adding to queue: airflow run schedule_test print_date 2016-01-06T00:00:00 --local -sd DAGS_FOLDER/test.py
2016-01-06 20:34:37,347 - root - INFO - Done queuing tasks, calling the executor's heartbeat
2016-01-06 20:34:37,347 - root - INFO - Loop took: 0.071298 seconds
2016-01-06 20:34:37,356 - root - INFO - Finding 'running' jobs without a recent heartbeat
2016-01-06 20:34:37,357 - root - INFO - Failing jobs without heartbeat after 2016-01-06 20:32:22.357089
2016-01-06 20:34:42,269 - root - INFO - Prioritizing 0 queued jobs
2016-01-06 20:34:42,274 - root - INFO - Importing /usr/local/airflow/dags/test.py
2016-01-06 20:34:42,277 - root - INFO - Loaded DAG <DAG: schedule_test>
2016-01-06 20:34:42,295 - root - INFO - Done queuing tasks, calling the executor's heartbeat
2016-01-06 20:34:42,296 - root - INFO - Loop took: 0.029931 seconds
2016-01-06 20:34:42,309 - root - INFO - Finding 'running' jobs without a recent heartbeat
2016-01-06 20:34:42,310 - root - INFO - Failing jobs without heartbeat after 2016-01-06 20:32:27.310303
2016-01-06 20:34:42,314 - root - INFO - commandairflow run schedule_test print_date 2016-01-06T00:00:00 --local -sd DAGS_FOLDER/test.py
Logging into: /usr/local/airflow/logs/schedule_test/print_date/2016-01-06T00:00:00
2016-01-06 20:34:47,895 - root - INFO - Prioritizing 0 queued jobs
2016-01-06 20:34:47,900 - root - INFO - Importing /usr/local/airflow/dags/test.py
2016-01-06 20:34:47,904 - root - INFO - Loaded DAG <DAG: schedule_test>
2016-01-06 20:34:47,922 - root - INFO - Checking state for <DagRun schedule_test @ 2016-01-06 00:00:00: scheduled__2016-01-06T00:00:00, externally triggered: False>
2016-01-06 20:34:47,925 - root - INFO - Marking run <DagRun schedule_test @ 2016-01-06 00:00:00: scheduled__2016-01-06T00:00:00, externally triggered: False> successful
2016-01-06 20:34:47,926 - root - INFO - Checking state for <DagRun schedule_test @ 2016-01-06 01:00:00: scheduled__2016-01-06T01:00:00, externally triggered: False>
2016-01-06 20:34:47,928 - root - INFO - Checking state for <DagRun schedule_test @ 2016-01-06 02:00:00: scheduled__2016-01-06T02:00:00, externally triggered: False>
2016-01-06 20:34:47,937 - root - INFO - Getting list of tasks to skip for active runs.
2016-01-06 20:34:47,940 - root - INFO - Checking dependencies on 2 tasks instances, minus 0 skippable ones
2016-01-06 20:34:47,943 - root - INFO - Adding to queue: airflow run schedule_test print_date 2016-01-06T01:00:00 --local -sd DAGS_FOLDER/test.py
2016-01-06 20:34:47,947 - root - INFO - Adding to queue: airflow run schedule_test print_date 2016-01-06T02:00:00 --local -sd DAGS_FOLDER/test.py
2016-01-06 20:34:47,960 - root - INFO - Done queuing tasks, calling the executor's heartbeat
2016-01-06 20:34:47,960 - root - INFO - Loop took: 0.067789 seconds
2016-01-06 20:34:47,968 - root - INFO - Finding 'running' jobs without a recent heartbeat
2016-01-06 20:34:47,968 - root - INFO - Failing jobs without heartbeat after 2016-01-06 20:32:32.968940
2016-01-06 20:34:52,901 - root - INFO - Prioritizing 0 queued jobs
2016-01-06 20:34:52,906 - root - INFO - Importing /usr/local/airflow/dags/test.py
2016-01-06 20:34:52,909 - root - INFO - Loaded DAG <DAG: schedule_test>
2016-01-06 20:34:52,942 - root - INFO - Checking state for <DagRun schedule_test @ 2016-01-06 01:00:00: scheduled__2016-01-06T01:00:00, externally triggered: False>
2016-01-06 20:34:52,946 - root - INFO - Checking state for <DagRun schedule_test @ 2016-01-06 02:00:00: scheduled__2016-01-06T02:00:00, externally triggered: False>
2016-01-06 20:34:52,948 - root - INFO - Checking state for <DagRun schedule_test @ 2016-01-06 03:00:00: scheduled__2016-01-06T03:00:00, externally triggered: False>
2016-01-06 20:34:52,950 - root - INFO - Getting list of tasks to skip for active runs.
2016-01-06 20:34:52,953 - root - INFO - Checking dependencies on 3 tasks instances, minus 0 skippable ones
2016-01-06 20:34:52,961 - root - INFO - Adding to queue: airflow run schedule_test print_date 2016-01-06T03:00:00 --local -sd DAGS_FOLDER/test.py
2016-01-06 20:34:52,975 - root - INFO - Done queuing tasks, calling the executor's heartbeat
2016-01-06 20:34:52,976 - root - INFO - Loop took: 0.07741 seconds
2016-01-06 20:34:52,982 - root - INFO - Finding 'running' jobs without a recent heartbeat
2016-01-06 20:34:52,983 - root - INFO - Failing jobs without heartbeat after 2016-01-06 20:32:37.983542
2016-01-06 20:34:52,987 - root - INFO - commandairflow run schedule_test print_date 2016-01-06T02:00:00 --local -sd DAGS_FOLDER/test.py
Logging into: /usr/local/airflow/logs/schedule_test/print_date/2016-01-06T02:00:00
2016-01-06 20:34:58,583 - root - INFO - commandairflow run schedule_test print_date 2016-01-06T01:00:00 --local -sd DAGS_FOLDER/test.py
Logging into: /usr/local/airflow/logs/schedule_test/print_date/2016-01-06T01:00:00
2016-01-06 20:35:04,215 - root - INFO - Prioritizing 0 queued jobs
2016-01-06 20:35:04,223 - root - INFO - Importing /usr/local/airflow/dags/test.py
2016-01-06 20:35:04,229 - root - INFO - Loaded DAG <DAG: schedule_test>
2016-01-06 20:35:04,263 - root - INFO - Checking state for <DagRun schedule_test @ 2016-01-06 01:00:00: scheduled__2016-01-06T01:00:00, externally triggered: False>
2016-01-06 20:35:04,267 - root - INFO - Marking run <DagRun schedule_test @ 2016-01-06 01:00:00: scheduled__2016-01-06T01:00:00, externally triggered: False> successful
2016-01-06 20:35:04,268 - root - INFO - Checking state for <DagRun schedule_test @ 2016-01-06 02:00:00: scheduled__2016-01-06T02:00:00, externally triggered: False>
2016-01-06 20:35:04,272 - root - INFO - Marking run <DagRun schedule_test @ 2016-01-06 02:00:00: scheduled__2016-01-06T02:00:00, externally triggered: False> successful
2016-01-06 20:35:04,273 - root - INFO - Checking state for <DagRun schedule_test @ 2016-01-06 03:00:00: scheduled__2016-01-06T03:00:00, externally triggered: False>
2016-01-06 20:35:04,276 - root - INFO - Checking state for <DagRun schedule_test @ 2016-01-06 04:00:00: scheduled__2016-01-06T04:00:00, externally triggered: False>
最佳答案
我看到了这个问题,实际上在 airflow.cfg 文件中你可以看到工作人员的数量和工作人员刷新时间,通常是 30 秒,所以每 30 秒启动一次新工作人员并再次加载所有 dags 并运行它们。我使工作人员刷新为 0 以解决此问题。
关于scheduler - airbnb airflow scheduler 即使每小时安排一次,也会继续运行任务,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/34642338/
有人可以看看我对 Quartz xml 的简单测试(每秒触发一次)并给我一个线索,为什么没有作业被添加到 sheduler 中?基本上我希望每秒触发“SimpleJob”类,我可以确定正在传递哪个作业
我创建了一个 Akka 的调度程序来每天按固定时间发送邮件(例如每天早上 6:00)。那么 Actor 怎么称呼呢?我的意思是我应该使用什么逻辑?谢谢。 最佳答案 只是计算现在和下一个下午 6 点之间
我正在使用 Quartz 调度,更具体地说是一个设置为每周每天晚上 10 点醒来的 cron 触发器。 我接触的另一个小组正在询问调度程序在一天中将唤醒多少次以检查它是否需要运行作业。晚上 10 点作
出现这些错误: 2018-01-22 18:00:59,797 [ServerService Thread Pool -- 79] ERROR org.quartz.ee.servlet.Quartz
出现这些错误: 2018-01-22 18:00:59,797 [ServerService Thread Pool -- 79] ERROR org.quartz.ee.servlet.Quartz
我对 Quartz Scheduler 工作线程有疑问。我创建了一个调度程序任务,它将每 3 小时执行一次。我创建了一份工作和一个触发器。当我执行这个调度程序时,我观察到一个奇怪的行为,同一个作业被分
我正在为我的网络应用程序实现 Quartz 调度程序。 我必须每周安排周一、周二重复 3 周 Quartz Scheduler 中的两种方式, 1)简单触发器: Trigger trigger = n
我正在使用 airbnb 的 Airflow ,我创建了一个简单的任务,如下所示。但是,即使我将间隔设置为每小时或任何其他间隔,调度程序仍会继续运行任务。我注意到的另一件事是,如果我将调度间隔设置为“
嗨,我是 Quartz Scheduler 的新手,我是第一次实现它。我想知道调度程序的开始调用是否会执行暂停的作业?或 暂停的作业只能通过恢复调用而不是其他任何方式来激活。请帮助我。 最佳答案 首先
如果我有一个运行着一堆触发器的 Quartz 调度程序,并且我想清除所有触发器,那么最好如何做到这一点? 我考虑过迭代组和名称,随时调用取消安排,但是当有数千个触发器到位时,这似乎非常慢(取消安排 1
嗨,我是 Quartz Scheduler 的新手,我是第一次实现它。我想知道调度程序的开始调用是否会执行暂停的作业?或 暂停的作业只能通过恢复调用而不是其他任何方式来激活。请帮助我。 最佳答案 首先
我在这里遇到了很多问题。我使用 ocLazyLoader 来加载完整的日历并且它运行良好,但是每当我尝试包含 fullCalendar-scheduler 时我在 JavaScript 中遇到这个错误
我最近在 Tardos 和 Kleinberg 的算法设计的第 4 章中阅读了有关间隔调度算法的内容。为间隔调度问题提供的解决方案是这样的: Sort the n intervals based on
如果一个进程被硬件中断(第一级中断处理程序)中断,那么 CPU 调度程序是否意识到这一点(例如,调度程序是否独立于被中断的进程计算硬件中断的执行时间)? 更多详情:我正在尝试解决以下问题:htop 中
为什么它们用于不同类型的任务?在处理计算任务与 io 任务时,它们有何不同? Schedulers.computation( ) - meant for computational work such
我在 couchbase 中使用 Observables。 Schedulers.io() 和 Schedulers.computation() 之间有什么区别? 最佳答案 RxJava调度器简介。
我遇到了一个可观察的问题: 在服务中我有一个函数(在 edit.component 中): public patchOne(entity: Tier): Observable { const
我正在研究 Flux 和 Mono,并在多线程环境中使用它们,并使用提供工作线程的 Schedular。 有很多选项可以使用 elastic、parallel 和 newElastic 来启动 Sch
FullCalendar 有一个名为 Scheduler 的附加组件,我正尝试将其与 PrimeNG-Schedule 组件一起使用。查看 PrimeNG 文档,有一个“选项”属性,我可以使用它向 F
我搜索了有关如何使用 Mass Transit 的 Quartz 集成 (https://github.com/MassTransit/MassTransit-Quartz) 的示例实现或博客文章。
我是一名优秀的程序员,十分优秀!