jscheffl commented on code in PR #61646:
URL: https://github.com/apache/airflow/pull/61646#discussion_r2977135800
##########
providers/edge3/src/airflow/providers/edge3/worker_api/routes/worker.py:
##########
@@ -173,7 +173,12 @@ def register(
query = select(EdgeWorkerModel).where(EdgeWorkerModel.worker_name ==
worker_name)
worker: EdgeWorkerModel | None = session.scalar(query)
if not worker:
- worker = EdgeWorkerModel(worker_name=worker_name, state=body.state,
queues=body.queues)
+ if hasattr(EdgeWorkerModel, "team_name"):
Review Comment:
The code running on API server always has the attribute post upgrade. No
need to check for existence.
##########
providers/edge3/src/airflow/providers/edge3/worker_api/routes/worker.py:
##########
@@ -194,6 +199,8 @@ def register(
worker.queues = body.queues
worker.sysinfo = json.dumps(body.sysinfo)
worker.last_update = timezone.utcnow()
+ if hasattr(EdgeWorkerModel, "team_name"):
Review Comment:
Same here.
--
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]