Class: RServiceBus::AppResource_Redis

Inherits:
AppResource show all
Defined in:
lib/rservicebus/AppResource/Redis.rb

Overview

Implementation of an AppResource - Redis

Instance Method Summary collapse

Methods inherited from AppResource

#Begin, #Commit, #Rollback, #_connect, #getResource, #initialize, #reconnect

Constructor Details

This class inherits a constructor from RServiceBus::AppResource

Instance Method Details

#connect(uri) ⇒ Object



8
9
10
11
12
# File 'lib/rservicebus/AppResource/Redis.rb', line 8

def connect(uri)
    port = uri.port || 6379

    return Redis.new( :host=>uri.host, :port=>port )
end

#finishedObject



14
15
16
# File 'lib/rservicebus/AppResource/Redis.rb', line 14

def finished
    @connection.quit
end