lib/rrj/init.rb in ruby_rabbitmq_janus-2.1.1 vs lib/rrj/init.rb in ruby_rabbitmq_janus-2.2.0.pre.42
- old
+ new
@@ -37,12 +37,10 @@
# @example Create a instance to this gem
# @rrj = RubyRabbitmqJanus::RRJ.new
# => #<RubyRabbitmqJanus::RRJ:0x007 @session=123>
def initialize
@option = Tools::Option.new
- ObjectSpace.define_finalizer(self, RRJ.method(:delete).to_proc) \
- unless File.basename($PROGRAM_NAME).eql?('rspec')
rescue => error
raise Errors::RRJ::InstanciateGem, error
end
# Start a transaction with Janus. Request use session_id information.
@@ -113,16 +111,7 @@
end
private
attr_reader :option
-
- def self.delete(_id)
- Tools::Cluster.instance.sessions.each do |janus_instance|
- array_ji = "#{janus_instance.instance},#{janus_instance.session}"
- `rake rrj:delete:one_instance[#{array_ji}]`
- end
- end
-
- private_class_method :delete
end
end