Run Two Programs Off The Same Procfile

£可爱£侵袭症+ 提交于 2020-07-10 10:27:40

问题


I have 2 discord bot programs, one is python code and the other is nodejs. I was wondering if in the procfile, like when you say worker: python ___, is there a way so that it runs both my python file and codejs file at the same time? Right now I can only get either or to run.

My procfile right now is just: worker: python log.py worker: node bot.js

Thank you for helping.


回答1:


Instead of your Procfile being:

worker: python log.py
worker: node bot.js

You do:

worker: python log.py & node bot.js & wait -n

see: https://help.heroku.com/CTFS2TJK/how-do-i-run-multiple-processes-on-a-dyno



来源:https://stackoverflow.com/questions/62529869/run-two-programs-off-the-same-procfile

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!