Sidekiq工作无休止地运行

时间:2016-09-01 06:01:56

标签: ruby-on-rails ruby heroku sidekiq ruby-on-rails-5

我在rails 5上使用sidekiq (4.1.2)Heroku 并在我的用户模型中编写的类方法上调用延迟 像:

delay.mass_invite_through_csv(mass_invitation.id, current_user, data)

这里mass_invitation是MassInvitation类的对象,current_user是current_user,data是哈希参数。

现在这种方法正在无限执行。

在我的Procfile中:

web: bundle exec rails server -p $PORT
worker: bundle exec sidekiq -C config/sidekiq.yml

在我的config / sidekiq.yml

concurrency:  3

一切都在本地正常运行,请帮忙。

1 个答案:

答案 0 :(得分:2)

Sidekiq retries failed jobs automatically, therefore you have to understand why it is failing first. 2 possible solutions here: tail into sidekiq output either mount sidekiq dashboard to your app and look whats wrong there.

Guide to install the dashboard