Skip to main content

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.

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)

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Files for dramatiq-abort, version 0.1b2
Filename, size File type Python version Upload date Hashes
Filename, size dramatiq_abort-0.1b2-py3-none-any.whl (9.8 kB) File type Wheel Python version py3 Upload date Hashes View hashes
Filename, size dramatiq-abort-0.1b2.tar.gz (9.2 kB) File type Source Python version None Upload date Hashes View hashes

Supported by

Elastic Elastic Search Pingdom Pingdom Monitoring Google Google BigQuery Sentry Sentry Error logging AWS AWS Cloud computing DataDog DataDog Monitoring Fastly Fastly CDN DigiCert DigiCert EV certificate StatusPage StatusPage Status page