libis-workflow 2.0.19 → 2.0.21
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/libis/workflow/status.rb +2 -2
- data/lib/libis/workflow/task.rb +3 -1
- data/lib/libis/workflow/version.rb +1 -1
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1369d1c69a4f8ee9f1d767c2047caf4c5fad0cee
|
4
|
+
data.tar.gz: 1b85e8cc488fb1b361ad4d68ff412079f2dacd97
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9b0bb414ceabdc6a1e1eeaba572ca6b77b4a1772f51bdb174a8cd28bd21f91d8bf09e0d70c230b57e0e3bc47c8ca9d51ae6f7db80c7c6cee5ed4e7f613539adc
|
7
|
+
data.tar.gz: 88bd9d8b6b8b5931c7ec35c9a57e0a93bbab802a07a66f299142ae46c08e517c4cefebac7514caf3b74c2421e2ff6419d366c0d0913294f18ca55fd3b81f08ed
|
@@ -88,10 +88,10 @@ module Libis
|
|
88
88
|
# @param [String] task namepath of the task
|
89
89
|
# @param [Integer] progress progress indicator (as <progress> of <max> or as % if <max> not set). Default: 0
|
90
90
|
# @param [Integer] max max count.
|
91
|
-
def status_progress(task, progress
|
91
|
+
def status_progress(task, progress, max = nil)
|
92
92
|
log_entry = self.status_entry(task)
|
93
93
|
log_entry ||= self.add_status_log('task' => task, 'status' => :STARTED, 'created' => DateTime.now)
|
94
|
-
log_entry['progress'] = progress
|
94
|
+
log_entry['progress'] = progress ? progress : (log_entry['progress'] || 0) + 1
|
95
95
|
log_entry['max'] = max if max
|
96
96
|
log_entry['updated'] = DateTime.now
|
97
97
|
self.save!
|
data/lib/libis/workflow/task.rb
CHANGED
@@ -15,7 +15,7 @@ module Libis
|
|
15
15
|
include ::Libis::Tools::Logger
|
16
16
|
include ::Libis::Tools::ParameterContainer
|
17
17
|
|
18
|
-
attr_accessor :parent, :name, :workitem
|
18
|
+
attr_accessor :parent, :name, :workitem, :processing_item
|
19
19
|
|
20
20
|
parameter recursive: false, description: 'Run the task on all subitems recursively.'
|
21
21
|
parameter abort_recursion_on_failure: false, description: 'Stop processing items recursively if one item fails.'
|
@@ -157,7 +157,9 @@ module Libis
|
|
157
157
|
|
158
158
|
unless @item_skipper
|
159
159
|
set_status item, :STARTED
|
160
|
+
self.processing_item = item
|
160
161
|
self.process item
|
162
|
+
item = self.processing_item
|
161
163
|
run_subitems(item) if parameter(:recursive)
|
162
164
|
set_status item, :DONE if item.check_status(:STARTED, self.namepath)
|
163
165
|
else
|
@@ -1,5 +1,5 @@
|
|
1
1
|
module Libis
|
2
2
|
module Workflow
|
3
|
-
VERSION = '2.0.
|
3
|
+
VERSION = '2.0.21' unless const_defined? :VERSION # the guard is against a redefinition warning that happens on Travis
|
4
4
|
end
|
5
5
|
end
|
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.0.
|
4
|
+
version: 2.0.21
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Kris Dekeyser
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-06-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: bundler
|
@@ -191,7 +191,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
191
191
|
version: '0'
|
192
192
|
requirements: []
|
193
193
|
rubyforge_project:
|
194
|
-
rubygems_version: 2.4
|
194
|
+
rubygems_version: 2.6.4
|
195
195
|
signing_key:
|
196
196
|
specification_version: 4
|
197
197
|
summary: LIBIS Workflow framework.
|