Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support throwing SkipMessage in before enqueue, make return type of send and send_with_options Optional #673

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
tooltips working
PavelSilnaHealth committed Jan 15, 2025

Verified

This commit was signed with the committer’s verified signature. The key has expired.
renovate-bot Mend Renovate
commit c9ca6a316227a075458b4ebb5278a4274d2d35bd
4 changes: 2 additions & 2 deletions dramatiq/brokers/rabbitmq.py
Original file line number Diff line number Diff line change
@@ -332,8 +332,8 @@ def enqueue(self, message, *, delay=None):
self.emit_before("enqueue", message, delay)
except SkipMessage:
self.logger.warning("Message %s was skipped during enqueue.", message)
proxy = MessageProxy(message)
proxy.fail() # Mark it as failed
proxy = _RabbitmqMessage(False, None, message) # redelivered=False, tag=None
proxy.fail()
self.emit_after("skip_message", proxy)
return None