You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I integrated sidekiq-unique-jobs, we started seeing Sidekiq no longer respecting the inline mode. It would try to call out to Redis, despite Sidekiq::Testing.inline! having been enabled.
I hunted around and eventually found this code snippet in your Gitter chat room:
# https://gitter.im/mhenrixon/sidekiq-unique-jobs?at=579288da32bd01d843a4e2e8
module SidekiqUniqueJobs
module Lock
class UntilExecuted
def lock(scope)
if scope.to_sym != :client
raise ArgumentError, "#{scope} middleware can't #{__method__} #{unique_key}"
end
logger.debug { "faked lock #{unique_key} for #{max_lock_time} seconds" }
true
end
end
end
module Unlockable
def unlock_by_key(unique_key, jid, redis_pool = nil)
logger.debug "faked unlock for #{unique_key}"
true
end
end
end
In the chat room "Mika Hel @mhenrixon" goes on to say:
Mika Hel @mhenrixon Jul 25 2016 01:29 @dorkusprime, @wagenet your issues should be mostly resolved in the newest version of the gem. Released yesterday evening
... I am using version 5.0.10 -- which is the latest version released, however, I still have to include that monkey patch. Is the fix definitely included in the gem? What am I doing wrong?
Thanks,
Kevin
The text was updated successfully, but these errors were encountered:
The problem is multifold. Some people would like their unique checks in inline and fake modes. Personally I'd like to avoid the custom mock_redis to test uniqueness in fake and inline modes.
It would be tremendously more simple to just allow jobs in sidekiq test mode to be sent to wherever rather than use locking for testing. In my opinion it should be enough to just allow jobs when sidekiq is running in test mode and if someone truly wants to run tests against the real thing they would be using the uniqueness checks.
It is hard to make that decision at the moment but maybe I will reconsider. Doesn't seem fair to test uniqueness in fake and inline modes anyway.
Hi! Thanks for your gem! It's very useful.
When I integrated sidekiq-unique-jobs, we started seeing Sidekiq no longer respecting the inline mode. It would try to call out to Redis, despite
Sidekiq::Testing.inline!
having been enabled.I hunted around and eventually found this code snippet in your Gitter chat room:
In the chat room "Mika Hel @mhenrixon" goes on to say:
... I am using version
5.0.10
-- which is the latest version released, however, I still have to include that monkey patch. Is the fix definitely included in the gem? What am I doing wrong?Thanks,
Kevin
The text was updated successfully, but these errors were encountered: