what's difference between celeryd, celery worker, celerybeat?

eugene picture eugene · Oct 30, 2013 · Viewed 8.3k times · Source

What is the difference between these?

  • celeryd
  • celery worker
  • celerybeat

I'm trying to setup celery + supervisor and some conf file on the net has more than one while others have only one.

Answer

wdh picture wdh · Oct 30, 2013

As far as I know, celeryd is just an old name for the celery worker command.

celerybeat is a scheduler that sends predefined tasks to a celery worker at a given time. You only need to bother with this if you want to run a task on a schedule. For example, if you had a task called backup-database that needed to be run every day at 1am, you could add that to the CELERYBEAT_SCHEDULE in your conf, which would look something like this.

CELERYBEAT_SCHEDULE = {
   'backup-database': {
        'task': 'tasks.backup_database',
        'schedule': crontab(hour=1, minute=0, day_of_week='*'),
        'args': (16, 16)
    },
}