eventq_rabbitmq 1.4.2 → 1.4.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 517ef49313af11a0e42263e48363439a402a9eee
4
- data.tar.gz: e58d797205d99c9e7ae43ad0aab697554d3404c3
3
+ metadata.gz: 5ccf4a2e634039669e9e35306bb1d7a372d5bd4e
4
+ data.tar.gz: 6f902d351788f776d7e66bdc021b26a92cc475a7
5
5
  SHA512:
6
- metadata.gz: 6cb38a9a0e4af097ea40def9b4467cca9d04c0da16fb5aee849efa9d590c164cb935bd57de33baf2942c5ea881b03258679b67cb8b5c7a9601dd65ae2264a354
7
- data.tar.gz: ea648f6c33e512bb435db277c0d348cc31a4a8abdba517b6bdfd775122858600ee9fbd5d0afdf04ffafe19f96d33588132133072c7193980a7ed69f8ba6b6649
6
+ metadata.gz: 2811a2230f23938590eedfe58688848737244b5824d8a51332c5093d4854a39358de6c1f6cf44a121b5f4019dadb98ae9bb8c8fe3b91f8db555c254ddab937ff
7
+ data.tar.gz: 4c5c816c3c59bb7e0ab033cc5a0a7fe82a1bf84d1c5f0c5984c56135d06b5fb4aabdaec80ff087361f72f6295b6e846acf2edfc72b238533915033f07fb7a1ce
@@ -26,6 +26,12 @@ module EventQ
26
26
  return conn.create_channel
27
27
  end
28
28
 
29
+ def get_connection
30
+ conn = Bunny.new(:host => @endpoint, :port => @port, :user => @user, :pass => @password, :ssl => @ssl)
31
+ conn.start
32
+ return conn
33
+ end
34
+
29
35
  end
30
36
  end
31
37
  end
@@ -36,6 +36,8 @@ module EventQ
36
36
  client = options[:client]
37
37
  manager = EventQ::RabbitMq::QueueManager.new
38
38
 
39
+ connection = client.get_connection
40
+
39
41
  #begin the queue loop for this thread
40
42
  while true do
41
43
 
@@ -44,7 +46,7 @@ module EventQ
44
46
  break
45
47
  end
46
48
 
47
- channel = client.get_channel
49
+ channel = connection.create_channel
48
50
 
49
51
  #get the queue
50
52
  q = manager.get_queue(channel, queue)
@@ -98,7 +100,6 @@ module EventQ
98
100
  end
99
101
 
100
102
  channel.close
101
- channel.connection.close
102
103
 
103
104
  #check if any message was received
104
105
  if !received && !error
@@ -109,6 +110,8 @@ module EventQ
109
110
 
110
111
  end
111
112
 
113
+ connection.close
114
+
112
115
  end
113
116
  @threads.push(thr)
114
117
 
@@ -1,3 +1,3 @@
1
1
  module EventqRabbitmq
2
- VERSION = "1.4.2"
2
+ VERSION = "1.4.3"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: eventq_rabbitmq
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.4.2
4
+ version: 1.4.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - vaughanbrittonsage