libis-workflow 2.1.3 → 2.1.5
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 +4 -4
- data/lib/libis/workflow/base/file_item.rb +2 -1
- data/lib/libis/workflow/task.rb +10 -0
- data/lib/libis/workflow/version.rb +1 -1
- data/spec/workflow_spec.rb +4 -4
- metadata +3 -4
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4ef72c9683a7f9bebb2148f90748b4cee50a1de85dd165f9402b496f6e333a2b
|
4
|
+
data.tar.gz: ff04df9816596546fea49280393dd25f72dab1c29c04a86932d5b7625808239b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 368a2ee404589674c477bde0a252ce7df017d0cf4b25deb072caa286a53a34d141b943d870f8e2bce160a90683ee1216daf18655c41874fb95820be7c1fc1cb6
|
7
|
+
data.tar.gz: '089c486d5d7bfb719be4442f5aff7c30bbd1691eb54a36e58f204bb429c79b2e2fbc21f9faafed5f0055d06ab32d34c54572126cd23bbb01b3d9993a2adad4f3'
|
@@ -1,6 +1,7 @@
|
|
1
1
|
require 'digest'
|
2
2
|
|
3
3
|
require 'libis/workflow/base/work_item'
|
4
|
+
require 'libis/tools/checksum'
|
4
5
|
|
5
6
|
module Libis
|
6
7
|
module Workflow
|
@@ -40,7 +41,7 @@ module Libis
|
|
40
41
|
self.properties['mode'] = stats.mode
|
41
42
|
self.properties['uid'] = stats.uid
|
42
43
|
self.properties['gid'] = stats.gid
|
43
|
-
set_checksum(:MD5, ::
|
44
|
+
set_checksum(:MD5, ::Libis::Tools::Checksum.hexdigest(name, :MD5)) if File.file?(name)
|
44
45
|
rescue => _e
|
45
46
|
# ignored
|
46
47
|
end
|
data/lib/libis/workflow/task.rb
CHANGED
@@ -240,6 +240,16 @@ module Libis
|
|
240
240
|
def substatus_check(status_count, item, task_or_item)
|
241
241
|
item_status = :DONE
|
242
242
|
|
243
|
+
if (not_started = status_count[:NOT_STARTED]) > 0
|
244
|
+
error "%d sub#{task_or_item}(s) not started", item, not_started
|
245
|
+
item_status = :FAILED
|
246
|
+
end
|
247
|
+
|
248
|
+
if (started = status_count[:STARTED]) > 0
|
249
|
+
error "%d sub#{task_or_item}(s) started but not done", item, started
|
250
|
+
item_status = :FAILED
|
251
|
+
end
|
252
|
+
|
243
253
|
if (waiting = status_count[:ASYNC_WAIT]) > 0
|
244
254
|
info "waiting for %d sub#{task_or_item}(s) in async process", item, waiting
|
245
255
|
item_status = :ASYNC_WAIT
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module Libis
|
2
2
|
module Workflow
|
3
|
-
VERSION = '2.1.
|
3
|
+
VERSION = '2.1.5' unless const_defined? :VERSION # the guard is against a redefinition warning that happens on Travis
|
4
4
|
end
|
5
5
|
end
|
data/spec/workflow_spec.rb
CHANGED
@@ -10,8 +10,8 @@ def check_output(logoutput, sample_out)
|
|
10
10
|
sample_out = sample_out.lines.to_a.map {|x| x.strip}
|
11
11
|
output = logoutput.string.lines.to_a.map {|x| x[/(?<=\] ).*/].strip}
|
12
12
|
|
13
|
-
puts 'output:'
|
14
|
-
ap output
|
13
|
+
# puts 'output:'
|
14
|
+
# ap output
|
15
15
|
|
16
16
|
expect(output.size).to eq sample_out.size
|
17
17
|
output.each_with_index do |o, i|
|
@@ -20,8 +20,8 @@ def check_output(logoutput, sample_out)
|
|
20
20
|
end
|
21
21
|
|
22
22
|
def check_status_log(status_log, sample_status_log)
|
23
|
-
puts 'status_log:'
|
24
|
-
status_log.each { |e| ap e }
|
23
|
+
# puts 'status_log:'
|
24
|
+
# status_log.each { |e| ap e }
|
25
25
|
expect(status_log.size).to eq sample_status_log.size
|
26
26
|
sample_status_log.each_with_index do |h, i|
|
27
27
|
h.keys.each {|key| expect(status_log[i][key.to_s]).to eq h[key]}
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: libis-workflow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.1.
|
4
|
+
version: 2.1.5
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kris Dekeyser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2023-07-05 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rake
|
@@ -163,8 +163,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
163
163
|
- !ruby/object:Gem::Version
|
164
164
|
version: '0'
|
165
165
|
requirements: []
|
166
|
-
|
167
|
-
rubygems_version: 2.7.8
|
166
|
+
rubygems_version: 3.1.6
|
168
167
|
signing_key:
|
169
168
|
specification_version: 4
|
170
169
|
summary: LIBIS Workflow framework.
|