Skip to content

Commit

Permalink
Use correct log string formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
zanieb committed Feb 24, 2023
1 parent eb8c165 commit dd46a28
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/prefect/_internal/concurrency/timeouts.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ def cancel_async_after(timeout: Optional[float]):
try:
with anyio.fail_after(timeout) as cancel_scope:
logger.debug(
f"Entered asynchronous cancel context with {timeout:.2}s timeout"
f"Entered asynchronous cancel context with %.2f timeout", timeout
)
yield ctx
finally:
Expand Down Expand Up @@ -149,8 +149,8 @@ def cancel_sync_after(timeout: Optional[float]):
if sys.platform.startswith("win"):
# Timeouts cannot be enforced on Windows
logger.warning(
f"Entered cancel context on Windows; {timeout:.2}s timeout will not be"
" enforced."
f"Entered cancel context on Windows; %.2f timeout will not be enforced.",
timeout,
)
yield ctx
return
Expand All @@ -165,8 +165,9 @@ def cancel_sync_after(timeout: Optional[float]):
try:
with method(timeout) as inner_ctx:
logger.debug(
f"Entered synchronous cancel context with {timeout:.2}s"
f" {method_name} based timeout"
f"Entered synchronous cancel context with %.2f %s based timeout",
timeout,
method_name,
)
yield ctx
finally:
Expand Down

0 comments on commit dd46a28

Please sign in to comment.