lib/redlock/testing.rb in seamusabshere-redlock-1.0.2 vs lib/redlock/testing.rb in seamusabshere-redlock-1.0.3
- old
+ new
@@ -24,12 +24,14 @@
unlock_without_testing lock_info unless @testing_mode == :bypass
end
class RedisInstance
def load_scripts
- if @redis.respond_to?(:script)
+ begin
@unlock_script_sha = @redis.script(:load, UNLOCK_SCRIPT)
@lock_script_sha = @redis.script(:load, LOCK_SCRIPT)
+ rescue Redis::CommandError
+ # ignore
end
end
end
end
end