如何运行Play!在Heroku的背景工作 [英] How to run Play! background jobs on Heroku
本文介绍了如何运行Play!在Heroku的背景工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
$ heroku scale worker = 1
缩放工作进程.. !!没有工人这样的类型
我创建了一个Procfile只包含
web:play run --http.port = $ PORT $ PLAY_OPTS
这只是针对网络,我找不到表达式来运行工作人员。
如何在Heroku上运行我的后台作业?
解决方案
您必须定义worker而不是web:
worker:play run --http.port = $ PORT $ PLAY_OPTS
I'm hardly using heroku for my Play! applications nowadays and I am new. I can deploy my web application but background jobs don't run. I tried to add worker but I got this error :
$ heroku scale worker=1
Scaling worker processes... ! No such type as worker
I created a Procfile includes just
web: play run --http.port=$PORT $PLAY_OPTS
It's just for web, I couldn't find expressions to run workers. How can I run my background jobs on Heroku?
解决方案
You have to define the worker instead of web:
worker: play run --http.port=$PORT $PLAY_OPTS
这篇关于如何运行Play!在Heroku的背景工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文