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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: b7f3ae4586ac85cd7d1137f02cb17c1aa699d544
|
4
|
+
data.tar.gz: 39fa794bba96809a3018738c7b899df2b20b17a1
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
data/lib/multiple_man/version.rb
CHANGED