Skip to content

Commit de15c74

Browse files
fix: temporary fix to avoid failing of sensor fast in case of shedule run is not present
1 parent dc5ab84 commit de15c74

File tree

1 file changed

+5
-1
lines changed
  • ext/scheduler/airflow2/resources

1 file changed

+5
-1
lines changed

ext/scheduler/airflow2/resources/__lib.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -240,7 +240,11 @@ def poke(self, context):
240240

241241
# parse relevant metadata from the job metadata to build the task window
242242
# TODO this needs to be updated to use optimus get job spec
243-
upstream_schedule = self.get_schedule_interval(schedule_time)
243+
try:
244+
upstream_schedule = self.get_schedule_interval(schedule_time)
245+
except Exception as e:
246+
self.log.warning("error while fetching upstream schedule :: {}".format(e))
247+
return False
244248

245249
last_upstream_schedule_time, _ = self.get_last_upstream_times(
246250
schedule_time, upstream_schedule)

0 commit comments

Comments
 (0)