Search: Rabbitmq docker in google
Starting RabbitMQ
1 2 3 4 5 |
docker run -d --hostname my-rabbit --name some-rabbit rabbitmq:3-management docker run -d --hostname my-rabbit --name some-rabbit -p 8080:15672 rabbitmq:3-management docker run -d --hostname localhost --name some-rabbit -p 5672:5672 -p 8080:15672 rabbitmq:3-management |
Starting Celery
Note: If you are using windows save yourself using gevent execution pool:
(https://stackoverflow.com/questions/62524908/task-receive-but-doesnt-excute)
1 2 3 |
$ pip install gevent celery -A tasks worker --concurrency=4 -l info -P gevent |
and for Django:
1 |
python manage.py celery worker -P gevent |
Running Celery worker and Beat
1 2 3 |
celery -A core worker -l info -P gevent --concurrency 2 celery -A core beat -l info |
Django Celery Beat extention
1 |
celery -A core beat -l info --scheduler django_celery_beat.schedulers:DatabaseScheduler |
Flow monitoring
1 |
celery --broker=amqp://guest:guest@localhost:5672// flower |
Flow monitoring
1 |
celery -A core events --dump |