diff --git a/src/dramatiq_abort/middleware.py b/src/dramatiq_abort/middleware.py index 847a7d7..6400f8e 100644 --- a/src/dramatiq_abort/middleware.py +++ b/src/dramatiq_abort/middleware.py @@ -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,