zold 0.14.51 → 0.14.52
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/zold/commands/next.rb +4 -0
- data/lib/zold/node/farm.rb +1 -1
- data/lib/zold/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3f2a2f29076ab430c597f9d07c7a72b7f10a378e3c69b9ff755b04f644accdb9
|
4
|
+
data.tar.gz: 5bab77f75e6b20cf1e80cb1f8bea44353ec0060e523c0c2c08614334d728c22b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7aec846b0b6443e195e989a414254fe80bca5e810b19000e60e574ba4721b64cb3ac820f85811c96b2a23db45c1c64291d0ae63e1eb619a30d5f27406354a432
|
7
|
+
data.tar.gz: 41d673a22f703fc01bdc857f61a7c82d3fa34059e1a05c2cd759532d65606df723e2810bff55ab44d6f2ef9f2c0914ec9c713ea557924b1244b1f6575c17ad3f
|
data/lib/zold/commands/next.rb
CHANGED
@@ -39,6 +39,9 @@ module Zold
|
|
39
39
|
opts = Slop.parse(args, help: true, suppress_errors: true) do |o|
|
40
40
|
o.banner = "Usage: zold next [options] score
|
41
41
|
Available options:"
|
42
|
+
o.bool '--low-priority',
|
43
|
+
'Set the lowest priority to this process',
|
44
|
+
default: false
|
42
45
|
o.bool '--help', 'Print instructions'
|
43
46
|
end
|
44
47
|
if opts.help?
|
@@ -51,6 +54,7 @@ Available options:"
|
|
51
54
|
private
|
52
55
|
|
53
56
|
def calculate(opts)
|
57
|
+
Process.setpriority(Process::PRIO_PROCESS, 0, 20) if opts['low-priority']
|
54
58
|
@log.info(Score.parse(opts.arguments.drop_while { |a| a.start_with?('--') }[1]).next.to_s)
|
55
59
|
end
|
56
60
|
end
|
data/lib/zold/node/farm.rb
CHANGED
@@ -176,7 +176,7 @@ module Zold
|
|
176
176
|
return unless s.strength >= strength
|
177
177
|
Thread.current.name = s.to_mnemo
|
178
178
|
bin = File.expand_path(File.join(File.dirname(__FILE__), '../../../bin/zold'))
|
179
|
-
Open3.popen2e("ruby #{bin} --skip-upgrades next \"#{s}\"") do |stdin, stdout, thr|
|
179
|
+
Open3.popen2e("ruby #{bin} --skip-upgrades --low-priority next \"#{s}\"") do |stdin, stdout, thr|
|
180
180
|
@log.debug("Score counting started in process ##{thr.pid}")
|
181
181
|
begin
|
182
182
|
stdin.close
|
data/lib/zold/version.rb
CHANGED