Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

NoMethodError: undefined method `to_sym' for true:TrueClass #125

Closed
tetherit opened this issue Oct 12, 2015 · 3 comments
Closed

NoMethodError: undefined method `to_sym' for true:TrueClass #125

tetherit opened this issue Oct 12, 2015 · 3 comments

Comments

@tetherit
Copy link

Since upgrading to sidekiq-unique-jobs 4.0.4 I'm getting this exception:

2015-10-12T11:11:08.474Z 32517 TID-owtv469k0 WARN: {"class"=>"WeatherWorker", "args"=>["561b954c3d1f92040a001b53"], "retry"=>3, "queue"=>"weather", "backtrace"=>true, "unique"=>true, "jid"=>"026688d62a780ddd3f90e5c0", "created_at"=>1444648268.4658263, "enqueued_at"=>1444648268.4662564, "error_message"=>"undefined method `to_sym' for true:TrueClass", "error_class"=>"NoMethodError", "failed_at"=>1444648268.47079, "retry_count"=>0, "error_backtrace"=>["/var/lib/gems/2.2.0/gems/sidekiq-unique-jobs-4.0.4/lib/sidekiq_unique_jobs/options_with_fallback.rb:25:in `lock_class'", "/var/lib/gems/2.2.0/gems/sidekiq-unique-jobs-4.0.4/lib/sidekiq_unique_jobs/options_with_fallback.rb:21:in `lock'", "/var/lib/gems/2.2.0/gems/sidekiq-unique-jobs-4.0.4/lib/sidekiq_unique_jobs/server/middleware.rb:18:in `call'", "/var/lib/gems/2.2.0/gems/sidekiq-3.5.1/lib/sidekiq/middleware/chain.rb:129:in `block in invoke'", "/var/lib/gems/2.2.0/gems/sidekiq-3.5.1/lib/sidekiq/middleware/server/retry_jobs.rb:74:in `call'", "/var/lib/gems/2.2.0/gems/sidekiq-3.5.1/lib/sidekiq/middleware/chain.rb:129:in `block in invoke'", "/var/lib/gems/2.2.0/gems/sidekiq-3.5.1/lib/sidekiq/middleware/server/logging.rb:11:in `block in call'", "/var/lib/gems/2.2.0/gems/sidekiq-3.5.1/lib/sidekiq/logging.rb:30:in `with_context'", "/var/lib/gems/2.2.0/gems/sidekiq-3.5.1/lib/sidekiq/middleware/server/logging.rb:7:in `call'", "/var/lib/gems/2.2.0/gems/sidekiq-3.5.1/lib/sidekiq/middleware/chain.rb:129:in `block in invoke'", "/var/lib/gems/2.2.0/gems/sidekiq-3.5.1/lib/sidekiq/middleware/chain.rb:132:in `call'", "/var/lib/gems/2.2.0/gems/sidekiq-3.5.1/lib/sidekiq/middleware/chain.rb:132:in `invoke'", "/var/lib/gems/2.2.0/gems/sidekiq-3.5.1/lib/sidekiq/processor.rb:51:in `block in process'", "/var/lib/gems/2.2.0/gems/sidekiq-3.5.1/lib/sidekiq/processor.rb:104:in `stats'", "/var/lib/gems/2.2.0/gems/sidekiq-3.5.1/lib/sidekiq/processor.rb:50:in `process'", "/var/lib/gems/2.2.0/gems/celluloid-0.17.2/lib/celluloid/calls.rb:28:in `public_send'", "/var/lib/gems/2.2.0/gems/celluloid-0.17.2/lib/celluloid/calls.rb:28:in `dispatch'", "/var/lib/gems/2.2.0/gems/celluloid-0.17.2/lib/celluloid/call/async.rb:7:in `dispatch'", "/var/lib/gems/2.2.0/gems/celluloid-0.17.2/lib/celluloid/cell.rb:50:in `block in dispatch'", "/var/lib/gems/2.2.0/gems/celluloid-0.17.2/lib/celluloid/cell.rb:76:in `block in task'", "/var/lib/gems/2.2.0/gems/celluloid-0.17.2/lib/celluloid/actor.rb:339:in `block in task'", "/var/lib/gems/2.2.0/gems/celluloid-0.17.2/lib/celluloid/task.rb:44:in `block in initialize'", "/var/lib/gems/2.2.0/gems/celluloid-0.17.2/lib/celluloid/task/fibered.rb:14:in `block in create'"]}
2015-10-12T11:11:08.474Z 32517 TID-owtv469k0 WARN: NoMethodError: undefined method `to_sym' for true:TrueClass
2015-10-12T11:11:08.474Z 32517 TID-owtv469k0 WARN: /var/lib/gems/2.2.0/gems/sidekiq-unique-jobs-4.0.4/lib/sidekiq_unique_jobs/options_with_fallback.rb:25:in `lock_class'
/var/lib/gems/2.2.0/gems/sidekiq-unique-jobs-4.0.4/lib/sidekiq_unique_jobs/options_with_fallback.rb:21:in `lock'
/var/lib/gems/2.2.0/gems/sidekiq-unique-jobs-4.0.4/lib/sidekiq_unique_jobs/server/middleware.rb:18:in `call'
/var/lib/gems/2.2.0/gems/sidekiq-3.5.1/lib/sidekiq/middleware/chain.rb:129:in `block in invoke'
/var/lib/gems/2.2.0/gems/sidekiq-3.5.1/lib/sidekiq/middleware/server/retry_jobs.rb:74:in `call'
/var/lib/gems/2.2.0/gems/sidekiq-3.5.1/lib/sidekiq/middleware/chain.rb:129:in `block in invoke'
/var/lib/gems/2.2.0/gems/sidekiq-3.5.1/lib/sidekiq/middleware/server/logging.rb:11:in `block in call'
/var/lib/gems/2.2.0/gems/sidekiq-3.5.1/lib/sidekiq/logging.rb:30:in `with_context'
/var/lib/gems/2.2.0/gems/sidekiq-3.5.1/lib/sidekiq/middleware/server/logging.rb:7:in `call'
/var/lib/gems/2.2.0/gems/sidekiq-3.5.1/lib/sidekiq/middleware/chain.rb:129:in `block in invoke'
/var/lib/gems/2.2.0/gems/sidekiq-3.5.1/lib/sidekiq/middleware/chain.rb:132:in `call'
/var/lib/gems/2.2.0/gems/sidekiq-3.5.1/lib/sidekiq/middleware/chain.rb:132:in `invoke'
/var/lib/gems/2.2.0/gems/sidekiq-3.5.1/lib/sidekiq/processor.rb:51:in `block in process'
/var/lib/gems/2.2.0/gems/sidekiq-3.5.1/lib/sidekiq/processor.rb:104:in `stats'
/var/lib/gems/2.2.0/gems/sidekiq-3.5.1/lib/sidekiq/processor.rb:50:in `process'
/var/lib/gems/2.2.0/gems/celluloid-0.17.2/lib/celluloid/calls.rb:28:in `public_send'
/var/lib/gems/2.2.0/gems/celluloid-0.17.2/lib/celluloid/calls.rb:28:in `dispatch'
/var/lib/gems/2.2.0/gems/celluloid-0.17.2/lib/celluloid/call/async.rb:7:in `dispatch'
/var/lib/gems/2.2.0/gems/celluloid-0.17.2/lib/celluloid/cell.rb:50:in `block in dispatch'
/var/lib/gems/2.2.0/gems/celluloid-0.17.2/lib/celluloid/cell.rb:76:in `block in task'
/var/lib/gems/2.2.0/gems/celluloid-0.17.2/lib/celluloid/actor.rb:339:in `block in task'
/var/lib/gems/2.2.0/gems/celluloid-0.17.2/lib/celluloid/task.rb:44:in `block in initialize'
/var/lib/gems/2.2.0/gems/celluloid-0.17.2/lib/celluloid/task/fibered.rb:14:in `block in create'

Any ideas?

@mhenrixon
Copy link
Owner

Check the readme for how unique is configured now. Can't just use unique: true anymore but have to specify the lock type. Could it be an old job maybe? I might have missed that, will look into it later today.

I mean like unique: :until_executing

@tetherit
Copy link
Author

Ah, ok, but from the changelog keeping "true" should throw a warning rather than an exception?

@mhenrixon
Copy link
Owner

mhenrixon commented Oct 12, 2015 via email

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant