symphony 0.12.0 → 0.12.1
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
- checksums.yaml.gz.sig +0 -0
- data.tar.gz.sig +0 -0
- data/ChangeLog +22 -2
- data/History.rdoc +8 -0
- data/lib/symphony.rb +1 -1
- data/lib/symphony/task_group/longlived.rb +4 -0
- data/spec/symphony/task_group/longlived_spec.rb +39 -0
- metadata +4 -4
- metadata.gz.sig +0 -0
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 530b4399dc67b699e1f8e53155faa141f7602f3bda7c27bae2682f8bb082e528
|
4
|
+
data.tar.gz: af53f8b1cfe8e82aaabea43a3897c8df3856770cee858b8671e4b512452d451d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1520a576d3a7f618d8a7a0f2717012a44fa091a44344316d0d7cc77694de6ff08c59cd6c05feac730fb6b60a6bb3b5abca2229a24cd1e71c07d8c6f89a45af00
|
7
|
+
data.tar.gz: e1143395288a3e770b2afb1ddb30ee11899c79306603d99a2393f4119e1c90aef346f27d53971d0360a16e8678a8df9202108a38b69f7d9f1449900311954e59
|
checksums.yaml.gz.sig
CHANGED
Binary file
|
data.tar.gz.sig
CHANGED
Binary file
|
data/ChangeLog
CHANGED
@@ -1,8 +1,28 @@
|
|
1
|
+
2019-07-01 Michael Granger <ged@FaerieMUD.org>
|
2
|
+
|
3
|
+
@ * spec/symphony/task_group/longlived_spec.rb:
|
4
|
+
| Add a spec for closed-channel recovery
|
5
|
+
| [38701b4ddb53] [tip]
|
6
|
+
|
|
7
|
+
2019-06-28 Mahlon E. Smith <mahlon@martini.nu>
|
8
|
+
|
9
|
+
o * lib/symphony/task_group/longlived.rb:
|
10
|
+
| Longlived workers: recover from a closed channel.
|
11
|
+
| [c2e7fccca675]
|
12
|
+
|
|
1
13
|
2019-06-26 Michael Granger <ged@FaerieMUD.org>
|
2
14
|
|
3
|
-
|
15
|
+
o * .hgtags:
|
16
|
+
| Added tag v0.12.0 for changeset dab8bd9f4b44
|
17
|
+
| [f29b8df45b29]
|
18
|
+
|
|
19
|
+
o * .hgsigs:
|
20
|
+
| Added signature for changeset 0b40141657be
|
21
|
+
| [dab8bd9f4b44] [v0.12.0]
|
22
|
+
|
|
23
|
+
o * History.rdoc, lib/symphony.rb:
|
4
24
|
| Bump the minor version, update history.
|
5
|
-
| [0b40141657be]
|
25
|
+
| [0b40141657be]
|
6
26
|
|
|
7
27
|
o * lib/symphony/metrics.rb, lib/symphony/task.rb,
|
8
28
|
| spec/symphony/task_spec.rb:
|
data/History.rdoc
CHANGED
data/lib/symphony.rb
CHANGED
@@ -66,6 +66,10 @@ class Symphony::TaskGroup::LongLived < Symphony::TaskGroup
|
|
66
66
|
|
67
67
|
count = @queue.message_count
|
68
68
|
self.add_sample( count )
|
69
|
+
|
70
|
+
rescue Bunny::ChannelAlreadyClosed => err
|
71
|
+
self.log.debug "Unexpected queue state, resetting: "% [ err.message ]
|
72
|
+
@queue = nil
|
69
73
|
end
|
70
74
|
|
71
75
|
|
@@ -217,6 +217,45 @@ describe Symphony::TaskGroup::LongLived do
|
|
217
217
|
expect( task_group.workers.size ).to eq( 1 )
|
218
218
|
end
|
219
219
|
|
220
|
+
|
221
|
+
it "reconnects if the message-count channel goes away" do
|
222
|
+
samples = [ 4, 3, 3 ]
|
223
|
+
task_group.sample_size = samples.size
|
224
|
+
|
225
|
+
allow( Process ).to receive( :setpgid )
|
226
|
+
|
227
|
+
channel1 = double( Bunny::Channel )
|
228
|
+
channel2 = double( Bunny::Channel )
|
229
|
+
queue1 = double( Bunny::Queue )
|
230
|
+
queue2 = double( Bunny::Queue )
|
231
|
+
|
232
|
+
expect( Symphony::Queue ).to receive( :amqp_channel ).
|
233
|
+
twice.
|
234
|
+
and_return( channel1, channel2 )
|
235
|
+
|
236
|
+
expect( channel1 ).to receive( :queue ).
|
237
|
+
with( task.queue_name, passive: true, prefetch: 0 ).
|
238
|
+
and_return( queue1 )
|
239
|
+
expect( queue1 ).to_not receive( :consumer_count )
|
240
|
+
expect( queue1 ).to receive( :message_count ).
|
241
|
+
and_raise( Bunny::ChannelAlreadyClosed.new("cannot use a closed channel!", channel1) )
|
242
|
+
|
243
|
+
expect( channel2 ).to receive( :queue ).
|
244
|
+
with( task.queue_name, passive: true, prefetch: 0 ).
|
245
|
+
and_return( queue2 )
|
246
|
+
expect( queue2 ).to receive( :consumer_count ) do
|
247
|
+
task_group.workers.size
|
248
|
+
end.at_least( :once )
|
249
|
+
expect( queue2 ).to receive( :message_count ).and_return( *samples )
|
250
|
+
|
251
|
+
start = 1414002605
|
252
|
+
start.upto( start + samples.size + 2 ) do |time|
|
253
|
+
Timecop.freeze( time ) do
|
254
|
+
task_group.adjust_workers
|
255
|
+
end
|
256
|
+
end
|
257
|
+
end
|
258
|
+
|
220
259
|
end
|
221
260
|
|
222
261
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: symphony
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.12.
|
4
|
+
version: 0.12.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael Granger
|
@@ -35,7 +35,7 @@ cert_chain:
|
|
35
35
|
v4qqqa27Bs468d6SoPxjSm8a2mM9HZ4OdWhq4tFsbTeXDVquCfi64OTEaTt2xQdR
|
36
36
|
JnC4lpJfCP6aCXa5h2XAQfPSH636cQap
|
37
37
|
-----END CERTIFICATE-----
|
38
|
-
date: 2019-
|
38
|
+
date: 2019-07-02 00:00:00.000000000 Z
|
39
39
|
dependencies:
|
40
40
|
- !ruby/object:Gem::Dependency
|
41
41
|
name: configurability
|
@@ -273,14 +273,14 @@ dependencies:
|
|
273
273
|
requirements:
|
274
274
|
- - "~>"
|
275
275
|
- !ruby/object:Gem::Version
|
276
|
-
version: '3.
|
276
|
+
version: '3.17'
|
277
277
|
type: :development
|
278
278
|
prerelease: false
|
279
279
|
version_requirements: !ruby/object:Gem::Requirement
|
280
280
|
requirements:
|
281
281
|
- - "~>"
|
282
282
|
- !ruby/object:Gem::Version
|
283
|
-
version: '3.
|
283
|
+
version: '3.17'
|
284
284
|
description: |-
|
285
285
|
Symphony is a subscription-based asynchronous job system. It
|
286
286
|
allows you to define jobs that watch for lightweight events from a
|
metadata.gz.sig
CHANGED
Binary file
|