Skip to content

Latest commit

 

History

History
37 lines (22 loc) · 1.03 KB

howto.md

File metadata and controls

37 lines (22 loc) · 1.03 KB

General How-to's

Celery

Start celery worker (for executing async functions)

celery -A worker

In this case this becomes

celery -A celery_service worker

Start celery beat (for periodic tasks)

Celery beat is the candidate to be started when you want to execute periodic tasks.

celery -A celery_service beat

Kill all celery processes

kill -9 $(ps aux | grep celery | grep -v grep | awk '{print $2}' | tr '\n' ' ') > /dev/null 2>&1

RabbitMQ

Start container with name, username and password

docker run --name -e RABBITMQ_DEFAULT_USER= -e RABBITMQ_DEFAULT_PASS= -p :5672 rabbitmq

PostgreSQL

Start container with name, password and volume to mount to

docker run -d --name -e POSTGRES_PASSWORD= -v :/var/lib/postgresql/data -p :5432 postgres

Alembic

Automatically generate migration

alembic revision --autogenerate -m "Add notification model"

Apply generated migration

alembic upgrade head