diff --git a/README.md b/README.md index e69de29..228a883 100644 --- a/README.md +++ b/README.md @@ -0,0 +1,40 @@ +# 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] + + +## Quickstart + +```python + +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) +``` + +[Redis]: https://redis.io +[dramatiq]: https://dramatiq.io/ + diff --git a/setup.py b/setup.py index 1d03c31..b70006e 100644 --- a/setup.py +++ b/setup.py @@ -89,7 +89,7 @@ def rel(*xs: str) -> str: "Topic :: System :: Distributed Computing", ( "License :: OSI Approved :: " - "GNU Lesser General Public License v3 or later (LGPLv3+)", + "GNU Lesser General Public License v3 or later (LGPLv3+)" ), ], )