workqueue 0.1.3 → 0.1.4

Sign up to get free protection for your applications and to get access to all the features.
@@ -36,9 +36,9 @@ class WorkQueue
36
36
  break if payload == :__break!
37
37
 
38
38
  aggregate[index] = job.call(payload)
39
- rescue Exception
39
+ rescue Exception => e
40
+ Thread.current[:exception] = e
40
41
  abort!
41
- raise
42
42
  end
43
43
  end
44
44
  end
@@ -71,6 +71,9 @@ class WorkQueue
71
71
 
72
72
  workers.each(&:join)
73
73
 
74
+ exception = workers.map { |w| w[:exception] }.compact.first
75
+ raise exception if exception
76
+
74
77
  self
75
78
  end
76
79
 
@@ -1,5 +1,5 @@
1
1
  class WorkQueue
2
2
  def self.version
3
- '0.1.3'
3
+ '0.1.4'
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: workqueue
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.3
4
+ version: 0.1.4
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2011-11-09 00:00:00.000000000Z
12
+ date: 2011-11-17 00:00:00.000000000Z
13
13
  dependencies: []
14
14
  description: ! ' A description will be forthcoming
15
15
 
@@ -38,7 +38,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
38
38
  version: '0'
39
39
  segments:
40
40
  - 0
41
- hash: 3748006813940409733
41
+ hash: 2557103099786094650
42
42
  required_rubygems_version: !ruby/object:Gem::Requirement
43
43
  none: false
44
44
  requirements:
@@ -47,7 +47,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
47
47
  version: '0'
48
48
  segments:
49
49
  - 0
50
- hash: 3748006813940409733
50
+ hash: 2557103099786094650
51
51
  requirements: []
52
52
  rubyforge_project: workqueue
53
53
  rubygems_version: 1.8.10