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.

Source Distribution

dramatiq-abort-1.2.0.tar.gz (14.5 kB view details)

Uploaded Source

Built Distribution

dramatiq_abort-1.2.0-py3-none-any.whl (12.8 kB view details)

Uploaded Python 3

File details

Details for the file dramatiq-abort-1.2.0.tar.gz.

File metadata

  • Download URL: dramatiq-abort-1.2.0.tar.gz
  • Upload date:
  • Size: 14.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.9.19

File hashes

Hashes for dramatiq-abort-1.2.0.tar.gz
Algorithm Hash digest
SHA256 790294db8a2100f901961b0ac9cd046172bb79fbf2c56a1d1c660326779f0335
MD5 106d75ac0c45a97722d170cc9d5b51fb
BLAKE2b-256 cd6c914c0774169cfba2caa4e7502f5aad27a662d6b15ecbe9ec8bb64109adf8

See more details on using hashes here.

File details

Details for the file dramatiq_abort-1.2.0-py3-none-any.whl.

File metadata

File hashes

Hashes for dramatiq_abort-1.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 b6b6c415dfef9e6367a7553d678a81025d46af95df9520ee0fa7f8b185130f76
MD5 3c7bdc455aaf190a350c430cea43181d
BLAKE2b-256 5d35804d31d1b58ed31fa0e45e672dbe7b535069e6408254aa92a2716d957029

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page