Skip to content

richrliu/dramatiq-abort

This branch is 3 commits ahead of, 2 commits behind Flared/dramatiq-abort:refs/heads/master.

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Sep 26, 2024
8c9da68 · Sep 26, 2024

History

53 Commits
Jul 20, 2022
May 5, 2023
Sep 26, 2024
Jul 20, 2022
Dec 24, 2019
Dec 7, 2021
Dec 7, 2021
Dec 24, 2019
Dec 25, 2019
Dec 26, 2019
Dec 25, 2019
Oct 10, 2021
Mar 22, 2021
Sep 25, 2024
Apr 24, 2023

Repository files navigation

dramatiq-abort

Add the aborting feature to dramatiq through a simple middleware with flexible backend.

Current version support aborting using the Redis store.

Build Status PyPI version Documentation

Installation

Since the only available backend right now is Redis:

pip install dramatiq_abort[redis]

Documentation: http://flared.github.io/dramatiq-abort

Quickstart

from dramatiq import get_broker
from dramatiq_abort import Abortable, backends, abort

abortable = Abortable(backend=backends.RedisBackend())
get_broker().add_middleware(abortable)

# ...

import dramatiq

@dramatiq.actor
def my_long_running_task(): ...

message = my_long_running_task.send()

# Now abort the message.
abort(message.message_id)

About

Dramatiq extension to abort message

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Python 100.0%