我有时会收到此错误:
undefined method `sidekiq_options_hash' for Sidekiq::Extensions::DelayedModel:Class
在代码的各个部分看起来似乎是随机的,在其他相同的情况下通常没有问题。我无法重现它。基于此,我怀疑它是某种并发问题。除此之外,我没有猜测。
我正在使用JRuby 1.7.18,也许这是相关的。
以下是示例回溯的开头:
NoMethodError: undefined method `sidekiq_options_hash' for Sidekiq::Extensions::DelayedModel:Class
File "/app/vendor/bundle/jruby/1.9/gems/sidekiq-3.3.0/lib/sidekiq/worker.rb", line 80, in get_sidekiq_options
File "/app/vendor/bundle/jruby/1.9/gems/sidekiq-3.3.0/lib/sidekiq/worker.rb", line 84, in client_push
File "/app/vendor/bundle/jruby/1.9/gems/sidekiq-3.3.0/lib/sidekiq/extensions/generic_proxy.rb", line 19, in method_missing
File "/app/app/controllers/application_controller.rb", line 53, in update_foo
application_controller第53行是:
current_user.delay.update_column(:foo, bar) # bar is an instance of Time