rsmp 0.8.5 → 0.8.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/lib/rsmp/collect/aggregated_status_collector.rb +1 -1
- data/lib/rsmp/collect/command_response_collector.rb +1 -1
- data/lib/rsmp/collect/status_collector.rb +2 -1
- data/lib/rsmp/proxy.rb +0 -14
- data/lib/rsmp/supervisor_proxy.rb +2 -2
- data/lib/rsmp/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 437183789b08f12b23264bc2716b84fd6c2298c2abab58dfb0b64529d004ac7d
|
4
|
+
data.tar.gz: 5595afbb4edb5d3e66320cae10c92c98a13fd56848095bb8ec4bb3615a097b05
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f3cdc4723d2d4616cc703d18aca6432c354bdbd7e4084c443a5f17aa8c420463d567813e73dc3fb454f02461b773149970932ee1d6d84f0434d8eaf21324a0ff
|
7
|
+
data.tar.gz: b90f7f2c8edc5722e0044cb31107779caabc4a9acbfce8bb713dd9a7d84e7272dd96fb2aad293c7d30e2350701758fe5300cfed776a774a754798cf8ac91037c
|
data/Gemfile.lock
CHANGED
@@ -2,7 +2,7 @@ module RSMP
|
|
2
2
|
# Class for waiting for an aggregated status response
|
3
3
|
class AggregatedStatusCollector < Collector
|
4
4
|
def initialize proxy, options={}
|
5
|
-
required = { type:
|
5
|
+
required = { type: 'AggregatedStatus', title: 'aggregated status' }
|
6
6
|
super proxy, options.merge(required)
|
7
7
|
end
|
8
8
|
end
|
@@ -2,8 +2,9 @@ module RSMP
|
|
2
2
|
# Base class for waiting for status updates or responses
|
3
3
|
class StatusCollector < StateCollector
|
4
4
|
def initialize proxy, want, options={}
|
5
|
-
super proxy, want, options.merge(title: 'status response'
|
5
|
+
super proxy, want, options.merge(title: 'status response')
|
6
6
|
|
7
|
+
@options[:type] ||= []
|
7
8
|
@options[:type] << 'StatusUpdate' unless options[:updates] == false
|
8
9
|
@options[:type] << 'StatusResponse' unless options[:reponses] == false
|
9
10
|
end
|
data/lib/rsmp/proxy.rb
CHANGED
@@ -572,20 +572,6 @@ module RSMP
|
|
572
572
|
node.site_id
|
573
573
|
end
|
574
574
|
|
575
|
-
def wait_for_acknowledgement parent_task, options={}, m_id
|
576
|
-
collector = Collector.new self, options.merge(task: parent_task, type: ['MessageAck','MessageNotAck'])
|
577
|
-
collector.collect do |message|
|
578
|
-
if message.is_a?(MessageNotAck)
|
579
|
-
if message.attribute('oMId') == m_id
|
580
|
-
m_id_short = RSMP::Message.shorten_m_id m_id, 8
|
581
|
-
raise RSMP::MessageRejected.new "Aggregated status request #{m_id_short} was rejected with '#{message.attribute('rea')}'"
|
582
|
-
end
|
583
|
-
elsif message.is_a?(MessageAck)
|
584
|
-
collector.complete if message.attribute('oMId') == m_id
|
585
|
-
end
|
586
|
-
end
|
587
|
-
end
|
588
|
-
|
589
575
|
def send_and_optionally_collect message, options, &block
|
590
576
|
collect_options = options[:collect] || options[:collect!]
|
591
577
|
if collect_options
|
@@ -138,8 +138,8 @@ module RSMP
|
|
138
138
|
"mId" => m_id,
|
139
139
|
})
|
140
140
|
|
141
|
-
send_and_optionally_collect message, options do |
|
142
|
-
|
141
|
+
send_and_optionally_collect message, options do |collect_options|
|
142
|
+
Collector.new self, collect_options.merge(task:@task, type: 'MessageAck')
|
143
143
|
end
|
144
144
|
end
|
145
145
|
|
data/lib/rsmp/version.rb
CHANGED