dat-worker-pool 0.6.2 → 0.6.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/lib/dat-worker-pool/version.rb +1 -1
- data/lib/dat-worker-pool/worker.rb +9 -4
- data/test/unit/worker_tests.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
SHA1:
|
3
|
-
metadata.gz: e1cc8332e3e05d65d1e9de7795dd3df9d2bcda89
|
4
|
-
data.tar.gz: 10cc848b2f52d31f1403b7305571db181ce7661d
|
5
2
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 8e47fb234c76756fc8a10bd23f377bced5b9fa90abc74ddf6d7f7a2604ed3528650d83a6bb7b9c1df0a0b1a413bc2f90ec3e944f19d3eae377841411cfbc8bcf
|
4
|
+
data.tar.gz: 78caf31d0bf5c1ca7475c4fe12f6155b4d07f3164f8282a0d295048862da24a6e72f32a41f8a906520f60327fef7a9e553373fc742f5f5abf1acff331d29f61d
|
5
|
+
SHA1:
|
6
|
+
metadata.gz: a7b75844837401a7a8833cf4a1316f80377aafb7
|
7
|
+
data.tar.gz: 2606f3ed2a79c34f1532808bf85e97bb17a38d15
|
@@ -8,10 +8,15 @@ class DatWorkerPool
|
|
8
8
|
|
9
9
|
# these are standard error classes that we rescue, handle and don't reraise
|
10
10
|
# in the work loop, this keeps the worker thread from shutting down
|
11
|
-
# unexpectedly; `
|
12
|
-
# that should be treated like a
|
13
|
-
# `
|
14
|
-
STANDARD_ERROR_CLASSES = [
|
11
|
+
# unexpectedly; `LoadError`, `NotImplementedError` and `Timeout::Error` are
|
12
|
+
# common non `StandardError` exception that should be treated like a
|
13
|
+
# `StandardError`, we don't want one of these to shutdown a worker thread
|
14
|
+
STANDARD_ERROR_CLASSES = [
|
15
|
+
StandardError,
|
16
|
+
LoadError,
|
17
|
+
NotImplementedError,
|
18
|
+
Timeout::Error
|
19
|
+
].freeze
|
15
20
|
|
16
21
|
def self.included(klass)
|
17
22
|
klass.class_eval do
|
data/test/unit/worker_tests.rb
CHANGED
@@ -31,7 +31,7 @@ module DatWorkerPool::Worker
|
|
31
31
|
should have_imeths :prepend_before_work, :prepend_after_work
|
32
32
|
|
33
33
|
should "know its standard error classes" do
|
34
|
-
exp = [StandardError, Timeout::Error]
|
34
|
+
exp = [StandardError, LoadError, NotImplementedError, Timeout::Error]
|
35
35
|
assert_equal exp, DatWorkerPool::Worker::STANDARD_ERROR_CLASSES
|
36
36
|
end
|
37
37
|
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: dat-worker-pool
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.6.
|
4
|
+
version: 0.6.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Collin Redding
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date: 2016-06-
|
13
|
+
date: 2016-06-28 00:00:00 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: assert
|