Skip to content

Commit

Permalink
Update warning message (expiration time out of bounds) in SummaryLogger
Browse files Browse the repository at this point in the history
  • Loading branch information
azawlocki committed May 31, 2021
1 parent aaa60ac commit a7889be
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions yapapi/executor/_smartq.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,9 +148,7 @@ async def mark_done(self, handle: Handle[Item]) -> None:
self._new_items.notify_all()
if _logger.isEnabledFor(logging.DEBUG):
stats = self.stats()
_logger.debug(
"status: " + ", ".join(f"{key}: {val}" for key, val in stats.items())
)
_logger.debug("status: " + ", ".join(f"{key}: {val}" for key, val in stats.items()))

async def reschedule(self, handle: Handle[Item]) -> None:
"""Free the item for reassignment to another consumer."""
Expand Down
4 changes: 2 additions & 2 deletions yapapi/log.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,8 +354,8 @@ def _handle(self, event: events.Event):
min, sec = divmod(round(timeout.total_seconds()), 60)
self.logger.warning(
f"Expiration time for your tasks is set to {min} min {sec} sec from now."
" Providers will probably not respond to tasks which expire sooner than 5 min"
" or later than 30 min, counting from the moment they get your demand."
" Providers may not be willing to take up tasks which expire sooner than 5 min"
" or later than 3 hours, counting from the moment they get your demand."
" Use the `timeout` parameter to `Executor()` to adjust the timeout."
)

Expand Down

0 comments on commit a7889be

Please sign in to comment.