Skip to content

Commit

Permalink
Merge pull request #273 from dawidzareba/main
Browse files Browse the repository at this point in the history
Debug statement should only log AsyncResult.id if it exists
  • Loading branch information
sibson committed Mar 28, 2024
2 parents feee53b + ed3b323 commit d529852
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion redbeat/schedulers.py
Original file line number Diff line number Diff line change
Expand Up @@ -476,7 +476,10 @@ def maybe_due(self, entry, **kwargs):
except Exception as exc:
logger.exception('Scheduler: Message Error: %s', exc)
else:
logger.debug('Scheduler: %s sent. id->%s', entry.task, result.id)
if result and hasattr(result, 'id'):
logger.debug('Scheduler: %s sent. id->%s', entry.task, result.id)
else:
logger.debug('Scheduler: %s sent.', entry.task)
return next_time_to_run

def tick(self, min=min, **kwargs):
Expand Down

0 comments on commit d529852

Please sign in to comment.