Skip to content

Commit

Permalink
⚡ perf: improve user experience with clearer log messages
Browse files Browse the repository at this point in the history
  • Loading branch information
zrr1999 committed Oct 19, 2024
1 parent c6a4aa7 commit 0c20b5d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion nanoflow/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ async def wrapper_fn():
logger.error(f"Failed to execute task: {e}")
if retry_interval:
retry = retry_interval.pop(0)
logger.info(f"Retry task after {retry} seconds")
logger.info(f"Retry task `{self.name}` after {retry} seconds")
await asyncio.sleep(retry)
return await wrapper_fn()
raise e
Expand Down
2 changes: 1 addition & 1 deletion nanoflow/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ def inner_fn() -> None:
process = subprocess.Popen(command, shell=True, env=environ)
returncode = process.wait()
if returncode != 0:
raise TaskProcessError(f"Task failed with return code {returncode}")
raise TaskProcessError(f"Task `{name}` failed with return code {returncode}")

return inner_fn

Expand Down

0 comments on commit 0c20b5d

Please sign in to comment.