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-1.2.1.tar.gz
(15.7 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file dramatiq_abort-1.2.1.tar.gz.
File metadata
- Download URL: dramatiq_abort-1.2.1.tar.gz
- Upload date:
- Size: 15.7 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
795ee9a37d884d70e63b758031017cd1f7c33f40db5f4901aaa95fcb659c13c0
|
|
| MD5 |
c9d156b32c08fc9de6b842cea456cf0d
|
|
| BLAKE2b-256 |
bcc764363acb81ea0df7e230efc1e04daf34c6e26ce59d0fd3bafff39b558c73
|
File details
Details for the file dramatiq_abort-1.2.1-py3-none-any.whl.
File metadata
- Download URL: dramatiq_abort-1.2.1-py3-none-any.whl
- Upload date:
- Size: 12.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.9.20
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d025e358875b437346cc2f665525735b1a079ce7dcac9c3dc70853fa798efd69
|
|
| MD5 |
ca75f69234d6235f8f2ac59ab8ee0b5e
|
|
| BLAKE2b-256 |
5d7c44815003095e842cc2917cdbc6b690603f984903559a26bffc23682fa0f9
|