在同一个Procfile上运行两个程序 [英] Run Two Programs Off The Same Procfile
本文介绍了在同一个Procfile上运行两个程序的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有2个不和谐的bot程序,一个是python代码,另一个是nodejs.我想知道是否在procfile中,就像您说的是worker:python ___一样,是否有办法使它同时运行我的python文件和codejs文件?现在,我只能选择其中一个或要运行.
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.
我现在的procfile就是: 工人:python log.py 工作者:节点bot.js
My procfile right now is just: worker: python log.py worker: node bot.js
感谢您的帮助.
推荐答案
而不是您的Procfile:
Instead of your Procfile being:
worker: python log.py
worker: node bot.js
您这样做:
worker: python log.py & node bot.js & wait -n
请参阅: https://help.heroku.com/CTFS2TJK/how-do-i-run-multiple-processes-on-a-dyno
这篇关于在同一个Procfile上运行两个程序的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文