jobQueue 1.0.7 → 1.0.8
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/README.rdoc +5 -1
- data/gemspec +2 -1
- data/lib/jobqueue.rb +3 -2
- metadata +3 -3
data/README.rdoc
CHANGED
@@ -76,7 +76,11 @@ accepts multiple files and processes one after another. Try '-h' for documentati
|
|
76
76
|
|
77
77
|
== Support, Issues, Bugs, ...
|
78
78
|
|
79
|
-
|
79
|
+
please use personal mail, ruby-lang mailing list or github
|
80
|
+
|
81
|
+
== Changelog
|
82
|
+
|
83
|
+
* 1.0.8: support AIX for getting the maximum number of processors, improve processor count for jruby and rbx
|
80
84
|
|
81
85
|
== Credits
|
82
86
|
|
data/gemspec
CHANGED
@@ -2,7 +2,7 @@ require 'rubygems'
|
|
2
2
|
|
3
3
|
spec = Gem::Specification.new do |s|
|
4
4
|
s.name = "jobQueue"
|
5
|
-
s.version = '1.0.
|
5
|
+
s.version = '1.0.8'
|
6
6
|
s.platform = Gem::Platform::RUBY
|
7
7
|
s.bindir = 'bin'
|
8
8
|
s.files = ["lib/jobqueue.rb","bin/prun.rb"] + ["gemspec","LICENSE","README.rdoc"]
|
@@ -16,6 +16,7 @@ spec = Gem::Specification.new do |s|
|
|
16
16
|
s.license = "BSD"
|
17
17
|
s.test_file = "test/test_jobqueue.rb"
|
18
18
|
s.required_ruby_version = ">= 1.8"
|
19
|
+
s.has_rdoc = true
|
19
20
|
end
|
20
21
|
|
21
22
|
# vim:ft=ruby
|
data/lib/jobqueue.rb
CHANGED
@@ -81,6 +81,9 @@ class JobQueue
|
|
81
81
|
end
|
82
82
|
return [system.NumberOfProcessors, processors].max
|
83
83
|
end
|
84
|
+
when /powerpc-aix/
|
85
|
+
return IO.popen("lsdev -Cc processor").readlines.size
|
86
|
+
# alternative, but slover: IO.popen("prtconf").readlines.grep(/Number of processors/i).first.split(" ").last.to_i
|
84
87
|
end
|
85
88
|
end
|
86
89
|
raise "Cannot determine the number of available Processors for RUBY_PLATFORM:'#{RUBY_PLATFORM}' and RUBY_ENGINE:#{RUBY_ENGINE}"
|
@@ -93,9 +96,7 @@ class SystemJobs < JobQueue
|
|
93
96
|
@threads = (1..@workers).map {|i|
|
94
97
|
Thread.new(@queue,@debug) {|q,dbg|
|
95
98
|
until ( q == ( task = q.deq ) )
|
96
|
-
warn task.first
|
97
99
|
ret = IO.popen(task.first).read
|
98
|
-
#puts ret if dbg
|
99
100
|
end
|
100
101
|
}
|
101
102
|
}
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jobQueue
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.0.
|
4
|
+
version: 1.0.8
|
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: 2012-
|
12
|
+
date: 2012-12-19 00:00:00.000000000 Z
|
13
13
|
dependencies: []
|
14
14
|
description: Run Shell commands or Ruby methods in parallel
|
15
15
|
email: stark.dreamdetective@gmail.com
|
@@ -47,7 +47,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
47
47
|
version: '0'
|
48
48
|
requirements: []
|
49
49
|
rubyforge_project:
|
50
|
-
rubygems_version: 1.8.
|
50
|
+
rubygems_version: 1.8.23
|
51
51
|
signing_key:
|
52
52
|
specification_version: 3
|
53
53
|
summary: Run Shell commands or Ruby methods in parallel
|