Skip to content

Commit

Permalink
readability
Browse files Browse the repository at this point in the history
Co-authored-by: Alexander Streed <[email protected]>
  • Loading branch information
zzstoatzz and desertaxle authored Dec 26, 2024
1 parent 7da7d9c commit 198d987
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/prefect/flow_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,11 +613,12 @@ def setup_run_context(self, client: Optional[SyncPrefectClient] = None):
self.flow_run.name = flow_run_name
self._flow_run_name_set = True

_logger, run_type = (
(get_run_logger(FlowRunContext.get()), "subflow")
if self.flow_run.parent_task_run_id
else (self.logger, "flow")
)
if self.flow_run.parent_task_run_id:
_logger = get_run_logger(FlowRunContext.get())
run_type = "subflow"
else:
_logger = self.logger
run_type = "flow"

_logger.info(
f"Beginning {run_type} run {self.flow_run.name!r} for flow {self.flow.name!r}"
Expand Down

0 comments on commit 198d987

Please sign in to comment.