lib/async/redis/client.rb in async-redis-0.5.0 vs lib/async/redis/client.rb in async-redis-0.5.1
- old
+ new
@@ -35,12 +35,12 @@
module Async
module Redis
# Legacy.
ServerError = ::Protocol::Redis::ServerError
- def self.local_endpoint
- Async::IO::Endpoint.tcp('localhost', 6379)
+ def self.local_endpoint(port: 6379)
+ Async::IO::Endpoint.tcp('localhost', port)
end
class Client
include ::Protocol::Redis::Methods
@@ -99,16 +99,17 @@
yield context
ensure
context.close
end
end
+
alias multi transaction
-
+
def pipeline(&block)
context = Context::Pipeline.new(@pool)
-
+
return context unless block_given?
-
+
begin
yield context
ensure
context.close
end