Celery components

watchmedo auto-restart --directory=./ --pattern=*main.py --debounce-interval=4 -- 
celery -A main worker --loglevel=INFO --concurrency=10 -n worker1@%h
  • Auto reload monitor real-time
watchmedo auto-restart --directory=./ --pattern=*tracking.py --debounce-interval=4 -- python tracking.py
  • Monitor events
celery -b amqp://localhost events

Scheduled with Celery Beat

The advantage of using send_task is that it allows for a more dynamic way of calling tasks, especially in a distributed system where tasks may be defined in different services. It also allows you to avoid importing the task module in the caller module, which can be useful in certain situations to reduce dependencies.