Copilot commented on code in PR #65472:
URL: https://github.com/apache/airflow/pull/65472#discussion_r3106990078
##########
providers/edge3/src/airflow/providers/edge3/cli/worker.py:
##########
@@ -80,6 +81,8 @@ def _edge_hostname() -> str:
class EdgeWorker:
"""Runner instance which executes the Edge Worker."""
+ start_time: datetime = datetime.now()
+ """Startup time of the worker."""
Review Comment:
`start_time` is defined as a class attribute initialized with
`datetime.now()` at import time, so all `EdgeWorker` instances will share the
same startup timestamp (and it won’t reflect the real worker process start if
the module is imported long before instantiation). Make this an instance
attribute set in `__init__` (and consider using an explicit UTC/aware timestamp
via `timezone.utcnow()` to avoid local-time ambiguity when
displayed/serialized).
--
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]