Search code examples
pythonherokuworkerprocfile

Heroku Python Worker ProcFile


I have a worker that I would like to run in heroku that is in the following directory:

project
-------worker
-------------worker.py
procfile

my procfile is in the root directory no problem and it runs my flask app correctly, but I've tried a few various combinations for the worker but can't seem to get it working (both project and worker folders have __init__.py). I've tried the following:

worker: python project.worker.worker
worker: python project.worker.worker.py

Solution

  • You need the following:

    worker: python project/worker/worker.py