rbbt-util 5.32.11 → 5.32.12
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/rbbt/util/cmd.rb +1 -2
- data/lib/rbbt/util/log/progress/report.rb +20 -17
- data/lib/rbbt/workflow/accessor.rb +1 -1
- data/lib/rbbt/workflow/step.rb +1 -1
- data/lib/rbbt/workflow/util/trace.rb +2 -1
- data/share/rbbt_commands/hpc/list +9 -5
- data/share/rbbt_commands/lsf/list +9 -5
- data/share/rbbt_commands/slurm/list +9 -5
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 355cf2694fc6b449600580f6c09f2a0a6055013285b5c53ada6ad2f920d7f63c
|
4
|
+
data.tar.gz: 26e430d330e39371b8fb59f3508b3e1eb215bf042bf2faa5262040fd19369e24
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ecec79da1a0b8ecdbcec6e600965d6cc8a336f6d33a4dd3ada4a75e2c6ae8d98300a210bc17eec7bb16639c4d73b4a6efe7bceb043037fa0aeaf76d3da20b172
|
7
|
+
data.tar.gz: 3af9d791b8423f99c67c473541fcc6b685c2cb4ca454423ff0b69d686442b40574d337df749dcf811369b81d68c648ff733dcf3c4e2e655953aba0f4569b85b1
|
data/lib/rbbt/util/cmd.rb
CHANGED
@@ -12,32 +12,35 @@ module Log
|
|
12
12
|
attr_accessor :history, :mean_max, :max_history
|
13
13
|
def thr_msg
|
14
14
|
if @history.nil?
|
15
|
-
@history ||= [[@ticks, Time.now] ]
|
15
|
+
@history ||= [[0, @start], [@ticks, Time.now] ]
|
16
16
|
elsif @last_ticks != @ticks
|
17
17
|
@history << [@ticks, Time.now]
|
18
|
-
max_history ||=
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
18
|
+
max_history ||= begin
|
19
|
+
max_history = case
|
20
|
+
when @ticks > 20
|
21
|
+
count = @ticks - @last_count
|
22
|
+
count = 1 if count == 0
|
23
|
+
if @max
|
24
|
+
times = @max / count
|
25
|
+
num = times / 20
|
26
|
+
num = 2 if num < 2
|
27
|
+
else
|
28
|
+
num = 10
|
29
|
+
end
|
30
|
+
count * num
|
31
|
+
else
|
32
|
+
20
|
33
|
+
end
|
34
|
+
max_history = 30 if max_history > 30
|
35
|
+
max_history
|
28
36
|
end
|
29
|
-
count * num
|
30
|
-
else
|
31
|
-
20
|
32
|
-
end
|
33
|
-
max_history = 30 if max_history > 30
|
34
37
|
@history.shift if @history.length > max_history
|
35
38
|
end
|
36
39
|
|
37
40
|
@last_ticks = @ticks
|
38
41
|
|
39
42
|
@mean_max ||= 0
|
40
|
-
if @history.length >
|
43
|
+
if @history.length > 3
|
41
44
|
|
42
45
|
sticks, stime = @history.first
|
43
46
|
ssticks, sstime = @history[-3]
|
@@ -302,7 +302,7 @@ module Workflow
|
|
302
302
|
workflow, task = m.values_at 1, 2
|
303
303
|
workflow = self.to_s if workflow.empty?
|
304
304
|
override_dependencies[workflow] ||= IndiferentHash.setup({})
|
305
|
-
override_dependencies[workflow][task] = value
|
305
|
+
override_dependencies[workflow][task] = value
|
306
306
|
end
|
307
307
|
end
|
308
308
|
override_dependencies
|
data/lib/rbbt/workflow/step.rb
CHANGED
@@ -161,7 +161,7 @@ class Step
|
|
161
161
|
|
162
162
|
archived_info = {}
|
163
163
|
dependencies.each do |dep|
|
164
|
-
if Symbol === dep.overriden
|
164
|
+
if Symbol === dep.overriden && ! Open.exists?(dep.info_file)
|
165
165
|
archived_info[dep.path] = dep.overriden
|
166
166
|
else
|
167
167
|
archived_info[dep.path] = dep.info
|
@@ -188,6 +188,7 @@ rbbt.png_plot('#{plot}', 'plot(timeline)', width=#{width}, height=#{height}, poi
|
|
188
188
|
seed_jobs.each do |step|
|
189
189
|
jobs += step.rec_dependencies + [step]
|
190
190
|
step.info[:archived_info].each do |path,ainfo|
|
191
|
+
next unless Hash === ainfo
|
191
192
|
archived_step = Step.new path
|
192
193
|
|
193
194
|
archived_step.define_singleton_method :info do
|
@@ -205,7 +206,7 @@ rbbt.png_plot('#{plot}', 'plot(timeline)', width=#{width}, height=#{height}, poi
|
|
205
206
|
|
206
207
|
end
|
207
208
|
|
208
|
-
jobs = jobs.uniq.sort_by{|job| t = job.info[:started] || Open.mtime(job.path) || Time.now; Time === t ? t : Time.parse(t) }
|
209
|
+
jobs = jobs.uniq.sort_by{|job| [job, job.info]; t = job.info[:started] || Open.mtime(job.path) || Time.now; Time === t ? t : Time.parse(t) }
|
209
210
|
|
210
211
|
data = trace_job_times(jobs, options[:fix_gap])
|
211
212
|
|
@@ -173,7 +173,7 @@ workdir.glob("**/command.batch").sort_by{|f| File.mtime(f)}.each do |fcmd|
|
|
173
173
|
select = true if queued && deps && (running_jobs & deps).any? || queued && is_running && nodes.empty?
|
174
174
|
select = true if running && nodes.any? && (exit_status.nil? && running_jobs.include?(id)) && (!deps || (running_jobs & deps).empty?)
|
175
175
|
select = true if jobid && jobid.split(",").include?(id)
|
176
|
-
select = select &&
|
176
|
+
select = select && step_path.match(/#{search}/) if search
|
177
177
|
next unless select
|
178
178
|
elsif search
|
179
179
|
select = false
|
@@ -292,13 +292,17 @@ workdir.glob("**/command.batch").sort_by{|f| File.mtime(f)}.each do |fcmd|
|
|
292
292
|
step_path = step_line.split(": ").last.strip
|
293
293
|
step = Step.new step_path
|
294
294
|
step.load_dependencies_from_info
|
295
|
+
has_bar = false
|
295
296
|
(step.rec_dependencies + [step]).reverse.each do |j|
|
296
297
|
next if j.done?
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
298
|
+
if j.file(:progress).exists?
|
299
|
+
bar = Log::ProgressBar.new
|
300
|
+
bar.load(j.file(:progress).yaml)
|
301
|
+
puts Log.color(:magenta, "Progress: ") + bar.report_msg + " " + Log.color(:yellow, j.task_signature)
|
302
|
+
has_bar = true
|
303
|
+
end
|
301
304
|
end
|
305
|
+
puts Log.color(:magenta, "Progress: ") + Log.color(:yellow, step.task_signature) + " #{step.status}" unless has_bar
|
302
306
|
end
|
303
307
|
end
|
304
308
|
|
@@ -173,7 +173,7 @@ workdir.glob("**/command.batch").sort_by{|f| File.mtime(f)}.each do |fcmd|
|
|
173
173
|
select = true if queued && deps && (running_jobs & deps).any? || queued && is_running && nodes.empty?
|
174
174
|
select = true if running && nodes.any? && (exit_status.nil? && running_jobs.include?(id)) && (!deps || (running_jobs & deps).empty?)
|
175
175
|
select = true if jobid && jobid.split(",").include?(id)
|
176
|
-
select = select &&
|
176
|
+
select = select && step_path.match(/#{search}/) if search
|
177
177
|
next unless select
|
178
178
|
elsif search
|
179
179
|
select = false
|
@@ -292,13 +292,17 @@ workdir.glob("**/command.batch").sort_by{|f| File.mtime(f)}.each do |fcmd|
|
|
292
292
|
step_path = step_line.split(": ").last.strip
|
293
293
|
step = Step.new step_path
|
294
294
|
step.load_dependencies_from_info
|
295
|
+
has_bar = false
|
295
296
|
(step.rec_dependencies + [step]).reverse.each do |j|
|
296
297
|
next if j.done?
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
298
|
+
if j.file(:progress).exists?
|
299
|
+
bar = Log::ProgressBar.new
|
300
|
+
bar.load(j.file(:progress).yaml)
|
301
|
+
puts Log.color(:magenta, "Progress: ") + bar.report_msg + " " + Log.color(:yellow, j.task_signature)
|
302
|
+
has_bar = true
|
303
|
+
end
|
301
304
|
end
|
305
|
+
puts Log.color(:magenta, "Progress: ") + Log.color(:yellow, step.task_signature) + " #{step.status}" unless has_bar
|
302
306
|
end
|
303
307
|
end
|
304
308
|
|
@@ -173,7 +173,7 @@ workdir.glob("**/command.batch").sort_by{|f| File.mtime(f)}.each do |fcmd|
|
|
173
173
|
select = true if queued && deps && (running_jobs & deps).any? || queued && is_running && nodes.empty?
|
174
174
|
select = true if running && nodes.any? && (exit_status.nil? && running_jobs.include?(id)) && (!deps || (running_jobs & deps).empty?)
|
175
175
|
select = true if jobid && jobid.split(",").include?(id)
|
176
|
-
select = select &&
|
176
|
+
select = select && step_path.match(/#{search}/) if search
|
177
177
|
next unless select
|
178
178
|
elsif search
|
179
179
|
select = false
|
@@ -292,13 +292,17 @@ workdir.glob("**/command.batch").sort_by{|f| File.mtime(f)}.each do |fcmd|
|
|
292
292
|
step_path = step_line.split(": ").last.strip
|
293
293
|
step = Step.new step_path
|
294
294
|
step.load_dependencies_from_info
|
295
|
+
has_bar = false
|
295
296
|
(step.rec_dependencies + [step]).reverse.each do |j|
|
296
297
|
next if j.done?
|
297
|
-
|
298
|
-
|
299
|
-
|
300
|
-
|
298
|
+
if j.file(:progress).exists?
|
299
|
+
bar = Log::ProgressBar.new
|
300
|
+
bar.load(j.file(:progress).yaml)
|
301
|
+
puts Log.color(:magenta, "Progress: ") + bar.report_msg + " " + Log.color(:yellow, j.task_signature)
|
302
|
+
has_bar = true
|
303
|
+
end
|
301
304
|
end
|
305
|
+
puts Log.color(:magenta, "Progress: ") + Log.color(:yellow, step.task_signature) + " #{step.status}" unless has_bar
|
302
306
|
end
|
303
307
|
end
|
304
308
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: rbbt-util
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 5.32.
|
4
|
+
version: 5.32.12
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-05-
|
11
|
+
date: 2021-05-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|