我在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
一切都在本地正常运行,请帮忙。
答案 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.