Skip to content

Commit

Permalink
chore: clarify error message when task may/may not be cancelled due t…
Browse files Browse the repository at this point in the history
…o failures
  • Loading branch information
tandemdude committed Oct 1, 2024
1 parent 33726bc commit 589eb61
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lightbulb/tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -310,6 +310,13 @@ async def _loop(self) -> None:
return

n_failures += 1

if self._max_failures <= 0:
LOGGER.warning(
"Execution of tast %r failed", self._func.__name__, exc_info=(type(e), e, e.__traceback__)
)
continue

LOGGER.warning(
"Execution of task %r failed - cancelling after %s more failures",
self._func.__name__,
Expand Down

0 comments on commit 589eb61

Please sign in to comment.