Dramatiq middleware to abort tasks.
Project description
dramatiq-abort
Add the aborting feature to dramatiq through a simple middleware with flexible backend.
Current version support aborting using the Redis store.
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)
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
dramatiq-abort-0.1b2.tar.gz
(9.2 kB
view hashes)
Built Distribution
Close
Hashes for dramatiq_abort-0.1b2-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 30c1b55193bbfec5f7c4b56e4aa198c8d8a745e7824fbc5f0748e1c6dc9d83e7 |
|
MD5 | ea8bab6132240b22b2ee100466c1414a |
|
BLAKE2b-256 | fd55d6a5ccd71dff360af269844edc60ef81f2f6dc12826f56e2de29f518574b |