0

I've coded a discord bot and I tried to push it on heroku. However, I need to run multiple files and when I try to do that I runs only the last sentence. So how can I put multiple workers in a procfile?

worker: python mainfunctions.py 
worker: python commands.py 

(it only runs commands.py)

  • 3
    Depending on your use case do this: https://help.heroku.com/CTFS2TJK/how-do-i-run-multiple-processes-on-a-dyno or give your process different names e.g. `worker1`, `worker2` instead of `worker` – Tin Nguyen Oct 01 '20 at 08:28
  • Does this answer your question? [Heroku procfile multiple workers](https://stackoverflow.com/questions/52919452/heroku-procfile-multiple-workers) – anuragal Oct 01 '20 at 08:30
  • Have you scaled your app to run multiple worker processes in the first place? Are you using the free tier, note that you can run only one process from a type if you're using the free tier – FalseDev Oct 03 '20 at 17:25

1 Answers1

0

Just use different name for, actually according to heroku document worker has no special meaning so u can replace worker with different name for example

mainfunction: python mainfunctions.py commands: python commands.py

Sanjay
  • 1