phanikumv commented on code in PR #68997:
URL: https://github.com/apache/airflow/pull/68997#discussion_r3628163111
##########
providers/standard/src/airflow/providers/standard/sensors/external_task.py:
##########
@@ -191,11 +193,21 @@ def __init__(
execution_delta: datetime.timedelta | None = None,
execution_date_fn: Callable | None = None,
check_existence: bool = False,
- poll_interval: float = 2.0,
+ poke_interval: datetime.timedelta | float = 2.0,
+ poll_interval: datetime.timedelta | float | None = None,
deferrable: bool = conf.getboolean("operators", "default_deferrable",
fallback=False),
**kwargs,
):
- super().__init__(**kwargs)
+ if poll_interval is not None:
+ warnings.warn(
+ "Parameter `poll_interval` is deprecated and will be removed
in a future release. "
+ "Use `poke_interval` instead.",
+ AirflowProviderDeprecationWarning,
+ stacklevel=2,
+ )
+ poke_interval = poll_interval
+
+ super().__init__(poke_interval=poke_interval, **kwargs)
Review Comment:
I think this logic will break these two scenarios.Could you please verify?
Issue #68990 (which this PR closes) was a user complaining the 2-second
cadence produced ~10,800 log lines over 6 hours
```
#Case 1
ExternalTaskSensor(task_id="wait", external_dag_id="upstream_dag")
# Before this PR: pokes every 60s (base default)
# After this PR: pokes every 2s — 30x more DB/API checks, silently
# Case 2: reschedule mode
ExternalTaskSensor(task_id="wait", external_dag_id="upstream_dag",
mode="reschedule")
# After: the task gets requeued and writes a TaskReschedule row every 2
seconds
```
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]