iron_worker_ng 0.2.1 → 0.2.2
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.
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.2
|
@@ -4,19 +4,19 @@ require 'iron_worker_ng'
|
|
4
4
|
client = IronWorkerNG::Client.new(:token => iron_io_token,
|
5
5
|
:project_id => iron_io_project_id)
|
6
6
|
|
7
|
-
|
7
|
+
puts 'Running slave workers...'
|
8
8
|
task_ids = []
|
9
9
|
params[:args].each do |arg|
|
10
|
-
|
10
|
+
puts "Queueing slave with arg=#{arg.to_s}"
|
11
11
|
task_ids << client.tasks.create('SlaveWorker', { :arg => arg }).id
|
12
12
|
end
|
13
13
|
|
14
|
-
|
14
|
+
puts 'Retriving results from slaves logs'
|
15
15
|
results = task_ids.map do |id|
|
16
16
|
client.tasks.wait_for(id)
|
17
17
|
client.tasks.log(id).to_i
|
18
18
|
end
|
19
19
|
|
20
|
-
|
20
|
+
puts "Sum = #{ results.inject(:+) }"
|
21
21
|
|
22
|
-
|
22
|
+
puts 'Done'
|
@@ -1 +1 @@
|
|
1
|
-
|
1
|
+
puts params[:arg].inject(:+)
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: iron_worker_ng
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -167,7 +167,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
167
167
|
version: '0'
|
168
168
|
segments:
|
169
169
|
- 0
|
170
|
-
hash:
|
170
|
+
hash: 912710063
|
171
171
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
172
172
|
none: false
|
173
173
|
requirements:
|