简体   繁体   English

我已经制作了正确的 Procfile,但在仪表板中没有看到工人 dyno

[英]I've made a correct Procfile but I dont see a worker dyno in the dashboard

我试图将一个非常简单的机器人部署到 heroku,但我无法设置 worker dyno,因为它没有显示在仪表板上,即使我有一个只有一行的 Procfile:worker: node app.js

Same issue, I resolved it from Heroku documentation :同样的问题,我从 Heroku 文档中解决了它:

Scaling a process type Heroku runs one web dyno for you automatically, but other process types don't start by default.扩展进程类型 Heroku 会自动为您运行一个web dyno,但默认情况下不会启动其他进程类型。 To launch a worker, you need to scale it up to one dyno:要启动一个工作程序,您需要将其扩展到一个 dyno:

heroku ps:scale worker=1
Scaling worker processes... done, now running 1

I had the same issue, correct code but worker didn't appear.我有同样的问题,正确的代码,但没有出现工人。 For me, the issue was that my Procfile was named "procfile" and not "Procfile"对我来说,问题是我的 Procfile 被命名为“procfile”而不是“Procfile”

So the issue was that Heroku only builds off the master branch and I was developing on a different branch.所以问题是 Heroku 只建立在 master 分支上,而我在不同的分支上开发。 I solved this by assigning my current branch as the master branch git push heroku YourDifferentBranchHere:master我通过将我当前的分支分配为主分支来解决这个问题git push heroku YourDifferentBranchHere:master

The issue was easily solved for me once I changed the procfile name to Procfile .这个问题很容易解决了我一次,我改变了procfileProcfile After this I wrote the following code:在此之后,我编写了以下代码:

worker: node bot.js
$ heroku ps:scale web=1 worker=5
heroku ps:scale web=1 worker=5

Then I refreshed the page, it worked perfectly for me.然后我刷新了页面,它非常适合我。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 Heroku worker dyno 即使添加到 Procfile 中也没有显示 - Heroku worker dyno not showing up even though it is added in Procfile 当我将 Procfile 推送到 master 以部署应用程序时,Dyno 不会出现 - Dyno won't show up when I push Procfile to master to deploy the app 什么是Procfile? 和 Web 和 Worker - What is Procfile? and Web and Worker 我在这段代码中没有看到任何问题,但邮递员给我一个错误? - I dont see any problem in this code but postman gives me an error? Heroku 说我没有 Procfile - Heroku saying I don't have Procfile 如何将在node_modules中所做的更改提交回git? - How can I commit changes that I've made in node_modules back to git? 尽管我没有进行任何更改,但对我/照片的Facebook Graph呼叫现在返回“不支持的获取请求”。 - Facebook Graph calls to me/photos now return “Unsupported get request.” though I've made no changes 猫鼬/ Ejs-如果我再次看到该帖子,只有在我将其设为可见时,我才能看到我发表的评论 - Mongoose / Ejs - I can not see the comment I made if I GET to the post again, only after I made it thats when it is visible 如何在IBM-watson-IoT仪表板中查看网关连接的单个设备数据? - How can I see the gateway connected individual device data in the IBM-watson-IoT dashboard? Heroku 节点 websocket application worker dyno 部署 - Heroku node websocket application worker dyno deployment
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM