You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
ExternalTaskSensorTrigger ignores poke_interval and polls every 2 seconds with excessive logging while using deferrable=True #68990
When using ExternalTaskSensor with deferrable=True, the poke_interval parameter is ignored. The trigger polls every ~2 seconds regardless of the configured poke_interval, and logs "Sleeping for 2.0 seconds" on every cycle.
For a sensor with a 6-hour timeout, this generates ~10,800 log lines per task instance.
Use case/motivation
The trigger should respect the poke_interval parameter (or provide a separate trigger_poll_interval parameter) to control how often it checks the external DAG state, similar to how the non-deferred reschedule mode respects poke_interval.
Additional context:
This makes deferrable=True impractical for ExternalTaskSensor compared to mode="reschedule", which properly respects poke_interval and produces cleaner, more useful logs (including the external DAG name being waited on).
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.
@surendarvarmas - unfortunately, seems like there is a little bug here. poke_interval is "ignored" (for lack of a better phrase), and instead the poll_interval parameter is used. That being said, there is an easy fix for you here to immediately solve your issue (just changing poke_interval -> poll_interval).
Change here seems to be updating the __init__ method to instead take poke_interval, then using that here:
Not sure how we want to handle deprecating that poll_interval parameter? I assume there are quite a few users using poll_interval, and we don't want to break that.
@jroachgolf84 - This resolves the poke_interval issues but if we add the deferrable=True then it's not logging the dependent DAG name. Probably that needs to be addressed here as well.
I think that should be a one-line change - would you like to make that in another PR? I want to keep this one atomic (only including the poll/poke_interval changes).
Activity
boring-cyborg commentedon Jun 25, 2026
Thanks for opening your first issue here! Be sure to follow the issue template! If you are willing to raise PR to address this issue please do so, no need to wait for approval.
jroachgolf84 commentedon Jun 25, 2026
@surendarvarmas - unfortunately, seems like there is a little bug here.
poke_intervalis "ignored" (for lack of a better phrase), and instead thepoll_intervalparameter is used. That being said, there is an easy fix for you here to immediately solve your issue (just changingpoke_interval->poll_interval).Change here seems to be updating the
__init__method to instead takepoke_interval, then using that here:airflow/providers/standard/src/airflow/providers/standard/sensors/external_task.py
Line 455 in 2161027
Not sure how we want to handle deprecating that
poll_intervalparameter? I assume there are quite a few users usingpoll_interval, and we don't want to break that.jroachgolf84 commentedon Jun 25, 2026
I'm creating a PR for this now.
jroachgolf84 commentedon Jun 25, 2026
PR created for this issue: https://github.com/apache/airflow/pull/68997/changes
surendarvarmas commentedon Jun 25, 2026
@jroachgolf84 - This resolves the poke_interval issues but if we add the
deferrable=Truethen it's not logging the dependent DAG name. Probably that needs to be addressed here as well.jroachgolf84 commentedon Jun 25, 2026
Can you provide a bit more detail there?
surendarvarmas commentedon Jun 25, 2026
it's always logging -
{{external_task.py:119}} INFO - Sleeping for 2.0 secondsbut not for which dependent DAG it's waiting for.jroachgolf84 commentedon Jun 25, 2026
I think that should be a one-line change - would you like to make that in another PR? I want to keep this one atomic (only including the
poll/poke_intervalchanges).