如何使我的云代码在我的工人dyno而非Web dyno上运行?

时间:2018-06-30 21:44:01

标签: javascript node.js heroku parse-server cloud-code

我在heroku上部署了一个解析服务器。我在解析服务器上运行一些云代码,该代码需要几分钟才能运行,并且在Web dyno上运行时会导致Heroku超时错误。

heroku[router]: at=error code=H12 desc="Request timeout" method=POST path="/parse/functions/timeScore

我的理解是,如果我可以使云代码运行在dyno上,则不会出现任何超时错误。这是正确的吗?

因此,现在我的应用程序上正在运行网络和工作动态。

enter image description here

这是我的Procfile

web: node index.js
worker: node bin/timeScoreJob

我还需要执行其他操作来在worker dyno上运行云代码吗?由于它当前无法在worker dyno上运行。从运行代码时的英勇日志来看,它可以在Web dyno上运行,但我仍然收到超时错误。

这是我从终端运行云代码的方式

heroku run node bin/timeScoreJob

我在做什么错?为什么我的代码没有在worker dyno上运行?

0 个答案:

没有答案
相关问题