You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
published=self.published_class.objects.filter(
status=StatusChoice.SCHEDULE, expires_at__gte=timezone.now()
)
formessageinpublished:
try:
attempts=self.producer.send(message)
exceptExceededSendAttemptsExceptionasexc:
logger.exception(exc)
message.retry=exc.attemptsmessage.status=StatusChoice.FAILEDmessage.expires_at=timezone.now() +timedelta(15)
self.stdout.write(f"Message no published with body:\n{message.body}")
else:
message.retry=attemptsmessage.status=StatusChoice.SUCCEEDEDself.stdout.write(f"Message published with body:\n{message.body}")
finally:
message.save()
because new messages can arrive faster than once a second
def_waiting():
sleep(1)
while the solution does not allow itself to be scaled in any way; you cannot simply launch another Publisher, otherwise the message will be sent twice
The text was updated successfully, but these errors were encountered:
django-outbox-pattern/django_outbox_pattern/management/commands/publish.py
Line 47 in ea419ef
Such an implementation looks like a bottleneck
because new messages can arrive faster than once a second
while the solution does not allow itself to be scaled in any way; you cannot simply launch another Publisher, otherwise the message will be sent twice
The text was updated successfully, but these errors were encountered: