Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我很想知道是否有一种简单的方法可以从正在运行的进程中了解应用程序中正在运行的进程列表。
例如,假设我有一个web流程和一个worker流程。从web进程中,我可以知道我有 2 个worker进程正在运行吗?
web
worker
是的,您可以通过在 Gemfile 中添加 heroku Gem 来实现。
然后从代码运行系统命令。我在heroku bash上试过这个
运行连接到终端的 bash... up, run.1 ~ $ heroku ~ $ ~ $ heroku -v 2.25.0 ~ $ heroku ps
进程状态命令
网络……
它将提示输入密码,以便您可以使用 heroku 客户端类进行登录,然后列出所有进程。
希望这会帮助你。