bugraoz93 commented on code in PR #47063:
URL: https://github.com/apache/airflow/pull/47063#discussion_r1970320871
##########
providers/edge/src/airflow/providers/edge/executors/edge_executor.py:
##########
@@ -216,6 +216,21 @@ def _update_orphaned_jobs(self, session: Session) -> bool:
)
job.state = ti.state if ti else TaskInstanceState.REMOVED
+ if job.state != TaskInstanceState.RUNNING:
Review Comment:
Could you please add a unit test for this case?
##########
providers/edge/src/airflow/providers/edge/worker_api/routes/jobs.py:
##########
@@ -116,6 +121,34 @@ def state(
session: SessionDep,
) -> None:
"""Update the state of a job running on the edge worker."""
+ # execute query to catch the queue and check if state toggles to success
or failed
Review Comment:
For this one too, it would be great because there are queries and even an
`if` statement to test out. :)
--
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]