hoodoo 2.12.6 → 2.12.7
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/lib/hoodoo/communicators/pool.rb +12 -4
- data/lib/hoodoo/version.rb +2 -2
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 430542c918e33830c23d09b1d4d6116f9d948bdca2d43f60c7b65c3a6d8be4f9
|
4
|
+
data.tar.gz: add79127d4fcc1ffa7a99a83c59bcdc47f6a766ce27c96fe3bd9f18f07874f8e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1464c30acc087565f5c609ce1fbf6f9048dd9c3f995f2094ecdf7e6328b43d2c952e013feec8550ba253c820f0fd70946d52b40e1a57a2ecdf98138ba4a8a0a0
|
7
|
+
data.tar.gz: 5bfbf36ce4b624de24ef07bd64ba12462e471e3755ee23ce891370535e63382b986efdd2716a7caf25d365d36e8a800cad46c371935d59dbaf9384210b56099b
|
@@ -9,6 +9,8 @@
|
|
9
9
|
# 15-Dec-2014 (ADH): Created.
|
10
10
|
########################################################################
|
11
11
|
|
12
|
+
require 'pp'
|
13
|
+
|
12
14
|
module Hoodoo
|
13
15
|
module Communicators
|
14
16
|
|
@@ -151,7 +153,7 @@ module Hoodoo
|
|
151
153
|
begin
|
152
154
|
communicator.communicate( object )
|
153
155
|
rescue => exception
|
154
|
-
handle_exception( exception, communicator )
|
156
|
+
handle_exception( exception, communicator, object )
|
155
157
|
end
|
156
158
|
|
157
159
|
else
|
@@ -333,6 +335,7 @@ module Hoodoo
|
|
333
335
|
#
|
334
336
|
loop do
|
335
337
|
|
338
|
+
obj = nil
|
336
339
|
# Exception handler block.
|
337
340
|
#
|
338
341
|
begin
|
@@ -342,20 +345,23 @@ module Hoodoo
|
|
342
345
|
#
|
343
346
|
loop do
|
344
347
|
entry = work_queue.shift() # ".shift" => FIFO, ".pop" would be LIFO
|
348
|
+
obj = nil
|
345
349
|
|
346
350
|
if entry.terminate?
|
347
351
|
::Thread.exit
|
348
352
|
elsif entry.sync?
|
353
|
+
|
349
354
|
sync_queue << :sync
|
350
355
|
elsif entry.dropped?
|
351
356
|
communicator.dropped( entry.dropped )
|
352
357
|
else
|
358
|
+
obj = entry.payload
|
353
359
|
communicator.communicate( entry.payload )
|
354
360
|
end
|
355
361
|
end
|
356
362
|
|
357
363
|
rescue => exception
|
358
|
-
handle_exception( exception, communicator )
|
364
|
+
handle_exception( exception, communicator, obj )
|
359
365
|
|
360
366
|
end
|
361
367
|
end
|
@@ -453,12 +459,14 @@ module Hoodoo
|
|
453
459
|
#
|
454
460
|
# +exception+:: Exception (or Exception subclass) instance to print.
|
455
461
|
# +communicator+:: Communicator instance that raised the exception.
|
462
|
+
# +obj+:: Parameter passed to the communicator subclass instance
|
463
|
+
# #communicate methods
|
456
464
|
#
|
457
|
-
def handle_exception( exception, communicator )
|
465
|
+
def handle_exception( exception, communicator, obj )
|
458
466
|
begin
|
459
467
|
report = "Communicator class #{ communicator.class.name } raised exception '#{ exception }': #{ exception.backtrace }"
|
460
468
|
$stderr.puts( report )
|
461
|
-
|
469
|
+
pp( obj, $stderr )
|
462
470
|
rescue
|
463
471
|
# If the above fails then everything else is probably about to
|
464
472
|
# collapse, but optimistically try to ignore the error and keep
|
data/lib/hoodoo/version.rb
CHANGED
@@ -12,11 +12,11 @@ module Hoodoo
|
|
12
12
|
# The Hoodoo gem version. If this changes, be sure to re-run
|
13
13
|
# <tt>bundle install</tt> or <tt>bundle update</tt>.
|
14
14
|
#
|
15
|
-
VERSION = '2.12.
|
15
|
+
VERSION = '2.12.7'
|
16
16
|
|
17
17
|
# The Hoodoo gem date. If this changes, be sure to re-run
|
18
18
|
# <tt>bundle install</tt> or <tt>bundle update</tt>.
|
19
19
|
#
|
20
|
-
DATE = '
|
20
|
+
DATE = '2021-02-12'
|
21
21
|
|
22
22
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: hoodoo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.12.
|
4
|
+
version: 2.12.7
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Loyalty New Zealand
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2021-02-12 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rack
|
@@ -598,7 +598,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
598
598
|
- !ruby/object:Gem::Version
|
599
599
|
version: '0'
|
600
600
|
requirements: []
|
601
|
-
rubygems_version: 3.
|
601
|
+
rubygems_version: 3.2.9
|
602
602
|
signing_key:
|
603
603
|
specification_version: 4
|
604
604
|
summary: Opinionated APIs
|