estorm-message-processor 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +6 -14
- data/Gemfile.lock +4 -4
- data/README.md +2 -0
- data/lib/estorm-message-processor/base.rb +3 -0
- data/test/test_estorm.rb +5 -3
- metadata +4 -4
checksums.yaml
CHANGED
@@ -1,15 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
metadata.gz: !binary |-
|
9
|
-
M2Q4ZTZlMWU1YjBmMjU5NDFlMTExZWU0MDFjYzJkNmVmNWNiYzU5MmUwY2Q0
|
10
|
-
MzUxNjgwY2NhNjhjNzNjNzIzNmUwODljYjljOThmZjQ3YTk2NWRhMTU4Nzc5
|
11
|
-
Yzk5MjlmOTg1YWRkOGM0MDE3Mzc0OWYzOTdiYWNmNDYxMDJmNTY=
|
12
|
-
data.tar.gz: !binary |-
|
13
|
-
ZjljYjlkZDY0YmU5MjhkNDQ4OWNkOTQ3OWRhZGNjMTg5OWYyMDY1MzlmNDcz
|
14
|
-
OTcwYmNhMGIzOTQxYTk3MTJmZmQzOTgwYTI5Y2E2YmI2ZDlmMzc0ZGZiZmQ2
|
15
|
-
ZjI2Njc2YjA4MDM1MDU0Y2JmZDg1YWNjNDgwZWE3NTBlMDA4Mjc=
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 7cd2345e3475b164d08df424ad544d911f0f0463
|
4
|
+
data.tar.gz: 078ff886c27ab74cabcf6ac9d4f73e86dc2cc240
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 2dcf6a6886ee7d136afe8f3b45f5e84d0ab1ad599e3a561552759ac8101a5b8591d363a48a397863c96b3f57a57453f1f3a3bc191a34ad719a8f16cc21270b40
|
7
|
+
data.tar.gz: 14bc7bebc1da485417749ccc4f9fea4a3fd7637aec7c3af2cdf373e6cc459e847eb294b13fc1819b6b4010d3c0664d4661b6d8068aeaee8c211ae94e3f15f5f6
|
data/Gemfile.lock
CHANGED
@@ -1,18 +1,18 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
estorm-message-processor (0.1.
|
4
|
+
estorm-message-processor (0.1.3)
|
5
5
|
|
6
6
|
GEM
|
7
7
|
remote: https://rubygems.org/
|
8
8
|
specs:
|
9
|
-
amq-protocol (1.
|
10
|
-
bunny (0.10.
|
9
|
+
amq-protocol (1.8.0)
|
10
|
+
bunny (0.10.8)
|
11
11
|
amq-protocol (>= 1.6.0)
|
12
12
|
codeclimate-test-reporter (0.1.1)
|
13
13
|
simplecov (>= 0.7.1, < 1.0.0)
|
14
14
|
minitest (5.0.8)
|
15
|
-
multi_json (1.8.
|
15
|
+
multi_json (1.8.1)
|
16
16
|
simplecov (0.7.1)
|
17
17
|
multi_json (~> 1.0)
|
18
18
|
simplecov-html (~> 0.7.1)
|
data/README.md
CHANGED
@@ -39,9 +39,11 @@ This is the callback processor
|
|
39
39
|
|
40
40
|
# send a message using the client
|
41
41
|
Use the client to send a message to the delegate processor (background task)
|
42
|
+
|
42
43
|
def bunny_send
|
43
44
|
cmdhash={'command'=>'sendtemplates', 'promotion'=>self.id.to_s}
|
44
45
|
puts "----> to system [x] sending #{cmdhash.inspect}"
|
45
46
|
bunny=EstormMessageProcessor::Client.new
|
46
47
|
bunny.bunny_send(AMQPURL,Rails.env.production?,CONTACT_MESSAGE,cmdhash)
|
47
48
|
end
|
49
|
+
|
@@ -75,6 +75,9 @@ module EstormMessageProcessor
|
|
75
75
|
|
76
76
|
msg= "[*] Waiting for messages in #{@queue.name}. blocking is #{config[:blocking]}"
|
77
77
|
logger.info msg
|
78
|
+
msgcount,consumercount =@queue.status
|
79
|
+
msg = "queue status for queue #{config[:queuename]} message count: #{msgcount} consumers: #{consumercount}"
|
80
|
+
logger.info msg
|
78
81
|
@queue.subscribe(:block => config[:blocking]) do |delivery_info, properties, body|
|
79
82
|
process_messages(delivery_info,properties,body)
|
80
83
|
# cancel the consumer to exit
|
data/test/test_estorm.rb
CHANGED
@@ -11,10 +11,12 @@ class MessageFlag
|
|
11
11
|
end
|
12
12
|
end
|
13
13
|
class EstormMessageProcessor::Base
|
14
|
+
def delegate_testdelegate2(cmdhash)
|
15
|
+
puts "test delegate2 received #{cmdhash.inspect}"
|
16
|
+
end
|
14
17
|
def delegate_testdelegate(cmdhash)
|
15
|
-
puts "
|
18
|
+
puts "test delegate received #{cmdhash.inspect}"
|
16
19
|
MessageFlag.setflag
|
17
|
-
|
18
20
|
end
|
19
21
|
end
|
20
22
|
|
@@ -72,7 +74,7 @@ class EstormMessageProcessTest < Minitest::Test
|
|
72
74
|
|
73
75
|
end
|
74
76
|
def test_client
|
75
|
-
cmdhash={'command'=>'
|
77
|
+
cmdhash={'command'=>'testdelegate2', 'promotion'=>2.to_s}
|
76
78
|
puts "----> to system [x] sending #{cmdhash.inspect}"
|
77
79
|
config={:url => 'fakeurl',:connecturlflag=> false,:queuename => 'testqueue', :blocking => true}
|
78
80
|
bunny=EstormMessageProcessor::Client.new
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: estorm-message-processor
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Scott Sproule
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2013-10-
|
11
|
+
date: 2013-10-14 00:00:00.000000000 Z
|
12
12
|
dependencies: []
|
13
13
|
description: a gem to help rails app process AMQP queues for background jobs
|
14
14
|
email: scott.sproule@ficonab.com
|
@@ -75,12 +75,12 @@ require_paths:
|
|
75
75
|
- lib
|
76
76
|
required_ruby_version: !ruby/object:Gem::Requirement
|
77
77
|
requirements:
|
78
|
-
- -
|
78
|
+
- - '>='
|
79
79
|
- !ruby/object:Gem::Version
|
80
80
|
version: '0'
|
81
81
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
82
82
|
requirements:
|
83
|
-
- -
|
83
|
+
- - '>='
|
84
84
|
- !ruby/object:Gem::Version
|
85
85
|
version: 1.3.4
|
86
86
|
requirements: []
|