有三个Sensor任务,并且使用同一池,池'limit_sensor'设置为1,但池限制不起作用,三个池一起运行
sensor_wait = SqlSensor(
task_id='sensor_wait',
dag=dag,
conn_id='dest_data',
sql="select count(*) from test",
poke_interval=10,
timeout=60,
pool='limit_sensor',
priority_weight=100
)
same_pool1 = SqlSensor(
task_id='same_pool1',
dag=dag,
conn_id='dest_data',
sql="select count(*) from test",
poke_interval=10,
timeout=60,
pool='limit_sensor',
priority_weight=10
)
same_pool2 = SqlSensor(
task_id='same_pool2',
dag=dag,
conn_id='dest_data',
sql="select count(*) from test",
poke_interval=10,
timeout=60,
pool='limit_sensor',
priority_weight=10
)
有回填日志,气流为1.10.0
[2018-10-12 11:20:35,036] {jobs.py:2198} INFO - [backfill progress] | finished run 0 of 1 | tasks waiting: 0 | succeeded: 0 | running: 3 | failed: 0 | skipped: 0 | deadlocked: 0 | not ready: 0
在网络用户界面Admin->Pools
中,您可以看到:
Pool Slots Used Slots Queued Slots
limit_sensor 1 3 0
我应该如何使池限制起作用?谢谢。