Rails Heroku Sidekiq确认Procfile正在工作 [英] Rails Heroku Sidekiq Confirm Procfile is Working

查看:110
本文介绍了Rails Heroku Sidekiq确认Procfile正在工作的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在我的应用程序的根目录中设置了我的Procfile:

  web:bundle exec thin start -p $ PORT 
worker:bundle exec sidekiq -c 5 -v

我可以看到,heroku看到它了当我通过 git push heroku master

  Procfile声明类型 - > web,worker 

问题在于一堆作业只是陷入了入队部分。

如果我从命令行运行 heroku运行bundle exec sidekiq ,那么作业才会进行。

关于如何调试的任何想法?谢谢!

解决方案

您是否已经开始使用工人dynos? Heroku只会自动为您启动Web流程类型。检查 heroku ps 的输出 - 您可能只会看到您的web进程列出。



您需要做;;

  heroku ps:scale worker = 1 

添加一个工人动态调整并将其缩放到1。


I have set my Procfile in the root of my app:

web: bundle exec thin start -p $PORT
worker: bundle exec sidekiq -c 5 -v

and I can see that heroku sees it when I push my rails app up via git push heroku master

Procfile declares types      -> web, worker

The problem is that a bunch of jobs are just getting stuck in the "enqueue" section.

If I run heroku run bundle exec sidekiq from the command line, only then will the jobs process.

Any ideas on how I could debug this? Thanks!

解决方案

Have you started worker dynos? Heroku will only start the web process type automatically for you. Check the output of heroku ps - you'll probably only see your web process listed.

You would need to do;

 heroku ps:scale worker=1

to add a worker dyno and scale it to 1.

这篇关于Rails Heroku Sidekiq确认Procfile正在工作的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆