'How to add multiple workers in a procfile?

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)



Solution 1:[1]

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

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Sanjay