SameerMesiah97 commented on code in PR #64051:
URL: https://github.com/apache/airflow/pull/64051#discussion_r3178585872
##########
providers/airbyte/src/airflow/providers/airbyte/triggers/airbyte.py:
##########
@@ -70,6 +75,17 @@ async def run(self) -> AsyncIterator[TriggerEvent]:
hook = AirbyteHook(airbyte_conn_id=self.conn_id)
try:
while await self.is_still_running(hook):
+ if self.execution_deadline is not None:
+ if self.execution_deadline < time.time():
+ yield TriggerEvent(
+ {
+ "status": "timeout",
+ "message": f"Job run {self.job_id} has reached
execution timeout.",
+ "job_id": self.job_id,
+ }
+ )
+ return
+
if self.end_time < time.time():
yield TriggerEvent(
Review Comment:
The job status check has been moved before the timeout check to address this
concern.
##########
providers/airbyte/src/airflow/providers/airbyte/triggers/airbyte.py:
##########
@@ -70,6 +75,17 @@ async def run(self) -> AsyncIterator[TriggerEvent]:
hook = AirbyteHook(airbyte_conn_id=self.conn_id)
try:
while await self.is_still_running(hook):
+ if self.execution_deadline is not None:
+ if self.execution_deadline < time.time():
+ yield TriggerEvent(
+ {
+ "status": "timeout",
+ "message": f"Job run {self.job_id} has reached
execution timeout.",
+ "job_id": self.job_id,
+ }
+ )
+ return
+
if self.end_time < time.time():
yield TriggerEvent(
Review Comment:
The job status check has been moved before the timeout checks to address
this concern.
--
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]