【发布时间】:2015-04-08 23:48:48
【问题描述】:
我的工人的 perform 方法中有一个 begin rescue 块,就像这样
begin
HTTParty.get(url)
rescue
## call failed for some reason, log and stop performing
break
end
## do more stuff here with the result of the call if it didn't fail
## this can fail too so a further
begin
##would be cumbersome
rescue
end
但是我得到了Invalid break (SyntaxError)
还有其他方法可以告诉 sidekiq 这项工作基本上完成了吗?我不想让它重试,而是完全退出。
【问题讨论】:
标签: ruby-on-rails ruby sidekiq