Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/rksm/rusty-celery-tester
https://github.com/rksm/rusty-celery-tester
Last synced: about 1 month ago
JSON representation
- Host: GitHub
- URL: https://github.com/rksm/rusty-celery-tester
- Owner: rksm
- Created: 2024-05-05T16:34:16.000Z (8 months ago)
- Default Branch: master
- Last Pushed: 2024-05-05T16:34:27.000Z (8 months ago)
- Last Synced: 2024-10-13T10:25:22.713Z (3 months ago)
- Language: Python
- Size: 31.3 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# rust celery tester
What is this? You can test the
[rusty-celery](https://github.com/rusty-celery/rusty-celery/) crate with this
project, in particular the celery interop between Rust and Python.## How to use
If you have nix installed just run `direnv allow`, otherwise make sure that you have `just` installed and run `just venv`.
Then to start redis and rabbitmq run `just backend-start` (you can stop it with `just backend-stop`).
The [celery-tester.py](./celery-tester.py) script does most of the heavy lifting:
```
$ ./celery-tester.py --help
usage: celery-tester.py [-h] [--rust-worker] [--python-worker] [--rust-client] [--python-client]
[--tasks {add,expected_failure,unexpected_failure,task_with_timeout} [{add,expected_failure,unexpected_failure,task_with_timeout} ...]]
[--broker {redis,amqp}] [--verbose]options:
-h, --help show this help message and exit
--rust-worker
--python-worker
--rust-client
--python-client
--tasks {add,expected_failure,unexpected_failure,task_with_timeout} [{add,expected_failure,unexpected_failure,task_with_timeout} ...]
If not set, all tasks are run
--broker {redis,amqp}
--verbose, -v
```So e.g. to test celery for the `add` task with a Rust worker and a Python client you can run:
```
$ ./celery-tester.py --rust-worker --python-client --tasks add
```