Skip to content

Commit

Permalink
Persist aborted_or_skipped on Message.options
Browse files Browse the repository at this point in the history
  • Loading branch information
richrliu committed Sep 25, 2024
1 parent 7b108ca commit 28e42b5
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/dramatiq_abort/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,9 +99,11 @@ def before_process_message(

event = self.backend.poll(self.id_to_key(message.message_id, AbortMode.CANCEL))
if event:
message.options["aborted_or_skipped"] = True
raise SkipMessage()

self.manager.add_abortable(message.message_id)
message.options["aborted_or_skipped"] = True

def after_process_message(
self,
Expand Down

0 comments on commit 28e42b5

Please sign in to comment.