https://github.com/karantan/celery-sandbox
Sandbox for testing celery stuff
https://github.com/karantan/celery-sandbox
Last synced: 2 months ago
JSON representation
Sandbox for testing celery stuff
- Host: GitHub
- URL: https://github.com/karantan/celery-sandbox
- Owner: karantan
- License: mit
- Created: 2018-06-06T13:38:19.000Z (about 7 years ago)
- Default Branch: master
- Last Pushed: 2018-06-19T13:18:30.000Z (almost 7 years ago)
- Last Synced: 2025-02-13T15:53:52.370Z (4 months ago)
- Language: Python
- Size: 10.7 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Celery Sandbox
Sandbox for testing celery stuff
## Installation
You need to have [`pipenv` installed](https://docs.pipenv.org/#install-pipenv-today).
Then run:
```bash
$ pipenv install
```Because we are testing celery things you will also need to install
[redis](https://redis.io/).On OSX you can do:
```
$ brew install redis
```And then you need to start it:
```
$ brew services start redis
```Now you are ready to start playing with sandbox scripts. Have fun and I hope you
learn something.### How to `retries.py`
First run the celery worker:
```
$ pipenv run celery worker -A celery_sandbox.retries -l info
```Then open ipython in a new terminal, import `retries_exceeded` function and run it.
```
$ pipenv run ipython
...
In [1]: from celery_sandbox.retries import retries_exceeded
In [2]: retries_exceeded.delay(1, 2)
```Results will be seen in the first terminal.
#### Testing
Before you run the tests make sure redis and celery task are running. Then run:
```
$ pipenv run pytest celery_sandbox
```## Contributing
1. Fork it!
2. Create your feature branch: `git checkout -b my-new-feature`
3. Commit your changes: `git commit -am 'Add some feature'`
4. Push to the branch: `git push origin my-new-feature`
5. Submit a pull request