multiple_man 0.5.2 → 0.5.4

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: 0971001166a43f4e0a34b1e36d64c08f65610092
4
- data.tar.gz: 86fc132b82ee066581ebf3efb06e246ab2160ec8
3
+ metadata.gz: b7f3ae4586ac85cd7d1137f02cb17c1aa699d544
4
+ data.tar.gz: 39fa794bba96809a3018738c7b899df2b20b17a1
5
5
  SHA512:
6
- metadata.gz: 773894ff3d54b23f7310aaab37b6115a597a29dfd12c3ed59e036b77bfc80c4daba9e46dce27c0479da28dc94780657aea5a87b5dfa8e7a292ee4a5347f9eea1
7
- data.tar.gz: 5fad481c69da0df8e218c397a9b2c63d85a64c601deccacf3c9857f06c7233af295222ce684457913fd14bd2cc4068d2abd4295d7a533dbae367b00264dfbb2c
6
+ metadata.gz: 8346e9fa5130b1ceb3476e1e43394f39dc11e4ae37058caae87fe35f111aa3655d59e459678562ad043e606bdfc0a9280cd2c5a7e68146625c28f6eebc754523
7
+ data.tar.gz: a638ac410b4ad19f70d0a559458c7d065c81c3271351101eefbd50f08453f44c53945ab6fb80003b0780cc024b62fd71750b09940f5d27833e21d0bbd63757e1
@@ -6,6 +6,7 @@ module MultipleMan
6
6
  self.app_name = Rails.application.class.parent.to_s if defined?(Rails)
7
7
  self.enabled = true
8
8
  self.channel_pool_size = 5
9
+ self.worker_concurrency = 1
9
10
  end
10
11
 
11
12
  def logger
@@ -16,7 +17,8 @@ module MultipleMan
16
17
  @error_handler = block
17
18
  end
18
19
 
19
- attr_accessor :topic_name, :app_name, :connection, :enabled, :channel_pool_size, :error_handler
20
+ attr_accessor :topic_name, :app_name, :connection, :enabled, :channel_pool_size, :error_handler,
21
+ :worker_concurrency
20
22
  attr_writer :logger
21
23
  end
22
24
 
@@ -42,4 +42,10 @@ module MultipleMan
42
42
  attr_accessor :channel
43
43
 
44
44
  end
45
+
46
+ class ListenerConnection < Connection
47
+ def self.channel_pool
48
+ @channel_pool ||= ConnectionPool.new(size: 25, timeout: 5) { connection.create_channel(nil, MultipleMan.configuration.worker_concurrency) }
49
+ end
50
+ end
45
51
  end
@@ -12,7 +12,7 @@ namespace :multiple_man do
12
12
  def run_listener(listener)
13
13
  Rails.application.eager_load!
14
14
 
15
- MultipleMan::Connection.connect do |connection|
15
+ MultipleMan::ListenerConnection.connect do |connection|
16
16
  listener.start(connection)
17
17
 
18
18
  while(true)
@@ -1,3 +1,3 @@
1
1
  module MultipleMan
2
- VERSION = "0.5.2"
2
+ VERSION = "0.5.4"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: multiple_man
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.2
4
+ version: 0.5.4
5
5
  platform: ruby
6
6
  authors:
7
7
  - Ryan Brunner