【问题标题】:What's wrong with this Procfile? (heroku + rails + Resque)这个 Procfile 有什么问题? (heroku + rails + Resque)
【发布时间】:2016-01-14 06:46:25
【问题描述】:

我正在尝试使用 Procfile 自动启动我的 Resque 工作队列。这是我的 Procfile:

web: bundle exec rails server -p $PORT
redis: redis-server
resque: env TERM_CHILD=1 RESQUE_TERM_TIMEOUT=7 bundle exec rake resque:work

当我推送到 Heroku 时,我在控制台中看到:

远程发现进程类型:Procfile 声明类型 -> redis、resque、web

但是当我创建一个新的后台作业时,它并没有被执行。它只是坐在队列中。如果我运行 heroku ps,我只会得到:

web.1: up 2015/10/15 10:20:23

我该如何解决这个问题?我希望我的队列能够自动处理。

【问题讨论】:

    标签: ruby-on-rails heroku redis resque


    【解决方案1】:

    我必须运行命令

    heroku ps:scale worker=1
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2016-07-29
      • 2011-04-15
      • 2021-06-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多