Skip to content

Commit

Permalink
Fixes the arguments for the url generation in BaseWorker (#15982)
Browse files Browse the repository at this point in the history
  • Loading branch information
sam-phinizy authored Nov 11, 2024
1 parent 4f2fc5a commit 98592bd
Showing 1 changed file with 11 additions and 6 deletions.
17 changes: 11 additions & 6 deletions src/prefect/workers/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -878,13 +878,18 @@ async def _submit_scheduled_flow_runs(
get_current_settings().experiments.worker_logging_to_api_enabled
and self.backend_id
):
worker_url = url_for(
"worker", self._work_pool.name, worker_id=self.backend_id
)
try:
worker_url = url_for(
"worker",
obj_id=self.backend_id,
work_pool_name=self._work_pool_name,
)

run_logger.info(
f"Running on worker id: {self.backend_id}. See worker logs here: {worker_url}"
)
run_logger.info(
f"Running on worker id: {self.backend_id}. See worker logs here: {worker_url}"
)
except ValueError as ve:
run_logger.warning(f"Failed to generate worker URL: {ve}")

self._submitting_flow_run_ids.add(flow_run.id)
self._runs_task_group.start_soon(
Expand Down

0 comments on commit 98592bd

Please sign in to comment.