feng-tao commented on a change in pull request #4673: [AIRFLOW-3851]
ExternalTasksensor not check existence in later poke
URL: https://github.com/apache/airflow/pull/4673#discussion_r255174177
##########
File path: airflow/sensors/external_task_sensor.py
##########
@@ -117,7 +119,9 @@ def poke(self, context, session=None):
DM = DagModel
TI = TaskInstance
DR = DagRun
- if self.check_existence:
+
+ # we only do the check for 1st time, no need for subsequent poke
+ if self.check_existence and not self.has_check_existence:
Review comment:
I think that it is fine as rescheduling interval normally is much longer
than poke interval. Currently we load the DagBag using the dag file location in
every poke(default 60 sec) if the flag is set to true.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services