Ranjith Ramachandra
Ranjith Ramachandra

Reputation: 10764

How to run celery and celerybeat from the same command

I have a project which has two tasks.py files. The strucutre looks like something like this

root/
    webproject
        __init__.py
        models.py
         views.pu
        celerytasks/
            __init__.py
            celeryconfig.py
            tasks.py
    scheduledJobs/
        celeryconfig.py
        tasks.py

celerytasks are added by webrequests and scheduledJobs are well, scheduled jobs for the website (delete old files etc).

I have to run celery twice now from command line. Out code is not production yet, so I am using nohup to do this. My question is can I somehow run both with the same command.

I have just started using celery.

Upvotes: 0

Views: 756

Answers (1)

tbicr
tbicr

Reputation: 26080

I use next arguments: worker -B, but better look to documentation: http://docs.celeryproject.org/en/latest/userguide/periodic-tasks.html#starting-the-scheduler.

Upvotes: 1

Related Questions