rbbt-util 5.23.17 → 5.23.18
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.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 39526da82633a38054bbce4d640d5006f0e2f3d2
|
4
|
+
data.tar.gz: 2bb4766c1d2aea82fa9cdbccfa4ebc8f6ef49deb
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc8a05f50a9615be78b3cf65cac028208e02d8a00b0fdca73ddd389258e1e836cc573d25dcf90fb45805a322a204794f137ebb58f270f351c8646c6e2ec014f7
|
7
|
+
data.tar.gz: 1a9a0b9baf29b552cf4d19f0343d1154dccc87ecbe522226f49c6090b6c631ae1680505eedaa483aa117020583562679c3211c5ad5c4b0376ed559e187e5cb03
|
@@ -99,11 +99,11 @@ module Log
|
|
99
99
|
if @history.length > 3
|
100
100
|
|
101
101
|
sticks, stime = @history.first
|
102
|
-
ssticks, sstime = @history[3]
|
102
|
+
ssticks, sstime = @history[-3]
|
103
103
|
lticks, ltime = @history.last
|
104
104
|
|
105
105
|
mean = @mean = (lticks - sticks).to_f / (ltime - stime)
|
106
|
-
short_mean = (
|
106
|
+
short_mean = (lticks - ssticks).to_f / (ltime - sstime)
|
107
107
|
|
108
108
|
@mean_max = mean if mean > @mean_max
|
109
109
|
end
|
@@ -74,12 +74,16 @@ module Log
|
|
74
74
|
def self.with_bar(max, options = {})
|
75
75
|
bar = new_bar(max, options)
|
76
76
|
begin
|
77
|
+
error = false
|
77
78
|
yield bar
|
78
79
|
keep = false
|
79
80
|
rescue KeepBar
|
80
81
|
keep = true
|
82
|
+
rescue
|
83
|
+
error = true
|
84
|
+
raise $!
|
81
85
|
ensure
|
82
|
-
remove_bar(bar) if bar
|
86
|
+
remove_bar(bar, error) if bar
|
83
87
|
end
|
84
88
|
end
|
85
89
|
end
|
data/lib/rbbt/util/misc/lock.rb
CHANGED
@@ -26,21 +26,25 @@ module Misc
|
|
26
26
|
FileUtils.mkdir_p File.dirname(File.expand_path(file)) unless File.exist? File.dirname(File.expand_path(file))
|
27
27
|
|
28
28
|
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
29
|
+
begin
|
30
|
+
case options[:lock]
|
31
|
+
when Lockfile
|
32
|
+
lockfile = options[:lock]
|
33
|
+
lockfile.lock unless lockfile.locked?
|
34
|
+
when FalseClass
|
35
|
+
lockfile = nil
|
36
|
+
unlock = false
|
37
|
+
when Path, String
|
38
|
+
lock_path = options[:lock].find
|
39
|
+
lockfile = Lockfile.new(lock_path, options)
|
40
|
+
lockfile.lock
|
41
|
+
else
|
42
|
+
lock_path = File.expand_path(file + '.lock')
|
43
|
+
lockfile = Lockfile.new(lock_path, options)
|
44
|
+
lockfile.lock
|
45
|
+
end
|
46
|
+
rescue Aborted, Interrupt
|
47
|
+
raise LockInterrupted
|
44
48
|
end
|
45
49
|
|
46
50
|
res = nil
|
data/lib/rbbt/workflow.rb
CHANGED
@@ -308,7 +308,7 @@ module Workflow
|
|
308
308
|
Workflow.resolve_locals(inputs)
|
309
309
|
|
310
310
|
task_info = task_info(taskname)
|
311
|
-
task_inputs =
|
311
|
+
task_inputs = task.inputs
|
312
312
|
#defaults = IndiferentHash.setup(task_info[:input_defaults]).merge(task.input_defaults)
|
313
313
|
defaults = IndiferentHash.setup(task.input_defaults)
|
314
314
|
|
@@ -338,8 +338,8 @@ module Workflow
|
|
338
338
|
real_inputs = {}
|
339
339
|
|
340
340
|
inputs.each do |k,v|
|
341
|
-
default = defaults[k]
|
342
341
|
next unless (task_inputs.include?(k.to_sym) or task_inputs.include?(k.to_s))
|
342
|
+
default = defaults[k]
|
343
343
|
next if default == v
|
344
344
|
next if (String === default and Symbol === v and v.to_s == default)
|
345
345
|
next if (Symbol === default and String === v and v == default.to_s)
|
@@ -405,7 +405,11 @@ module Workflow
|
|
405
405
|
end
|
406
406
|
|
407
407
|
def load_id(id)
|
408
|
-
path =
|
408
|
+
path = if Path === workdir
|
409
|
+
workdir[id].find
|
410
|
+
else
|
411
|
+
File.join(workdir, id)
|
412
|
+
end
|
409
413
|
task = task_for path
|
410
414
|
return remote_tasks[task].load_id(id) if remote_tasks and remote_tasks.include? task
|
411
415
|
step = Step.new path, tasks[task.to_sym]
|
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.23.
|
4
|
+
version: 5.23.18
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Miguel Vazquez
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2018-08-
|
11
|
+
date: 2018-08-16 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|