lib/rrj/init.rb in ruby_rabbitmq_janus-1.0.3 vs lib/rrj/init.rb in ruby_rabbitmq_janus-1.0.4
- old
+ new
@@ -23,25 +23,15 @@
def initialize
# Instanciate singleton tools
start_instances_tools
# Create an session while time opening
- @session = Janus::Keepalive.instance.session
+ @session = Janus::Concurrencies::Keepalive.instance.session
@transaction = nil
- rescue => error
- raise Errors::RRJErrorInit, error
end
- # Listen a standar queue and working if necesary
- def listen(&block)
- # Send a processus to background
- # fork do
- Janus::Event.instance.listen(&block)
- # end
- end
-
# Send an simple message to janus. No options in request with this method.
# @param [String] type
# Given a type to request. JSON request writing in 'config/requests/'
# @param [Bollean] exclusive
# Use an exclusive queue or not
@@ -140,10 +130,9 @@
def start_instances_tools
Tools::Env.instance
Tools::Log.instance
Tools::Config.instance
Tools::Requests.instance
- Janus::Event.instance
end
# Return a current session if not specified
def use_current_session?(option)
{ 'session_id' => @session } unless option.key?('session_id')