jscheffl commented on code in PR #45958:
URL: https://github.com/apache/airflow/pull/45958#discussion_r1929604678
##########
providers/edge/src/airflow/providers/edge/plugins/edge_executor_plugin.py:
##########
@@ -115,6 +115,30 @@ def status(self, session: Session = NEW_SESSION):
five_min_ago = datetime.now() - timedelta(minutes=5)
return self.render_template("edge_worker_hosts.html", hosts=hosts,
five_min_ago=five_min_ago)
+ @expose("/status/maintenance/<string:worker_name>/on")
+ @has_access_view(AccessView.JOBS)
+ @provide_session
+ def worker_to_maintenance(self, worker_name: str, session: Session =
NEW_SESSION):
Review Comment:
Can you move the "logic" of writing to DB to
providers/edge/src/airflow/providers/edge/models/edge_worker.py such that in
the plugin only the front-end handling is made? Then the function can be easier
exposed as API later (would be cool to have this on API as well).
--
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]