uranusjr commented on code in PR #65472:
URL: https://github.com/apache/airflow/pull/65472#discussion_r3108616935
##########
providers/edge3/src/airflow/providers/edge3/executors/edge_executor.py:
##########
@@ -182,14 +183,22 @@ def _check_worker_liveness(self, session: Session) ->
bool:
)
else EdgeWorkerState.UNKNOWN
)
+ # Reset presented status
+ sysinfo = {}
+ sysinfo.update(worker.sysinfo or {}) # copy needed to have
alembic detect change in content
+ sysinfo["status"] = logging.NOTSET
+ if "status_text" in sysinfo:
+ del sysinfo["status_text"] # Remove old status text if exists
+ worker.sysinfo = sysinfo
+ self.log.warning("Worker %s is lifeless. Setting state to %s",
worker.worker_name, worker.state)
reset_metrics(worker.worker_name)
return changed
def _update_orphaned_jobs(self, session: Session) -> bool:
"""Update status ob jobs when workers die and don't update anymore."""
heartbeat_interval: int = self.conf.getint("scheduler",
"task_instance_heartbeat_timeout")
- lifeless_jobs: Sequence[EdgeJobModel] = session.scalars(
+ lifeless_jobs = session.scalars(
Review Comment:
Whye remove this? (And the one below)
--
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]