libis-workflow 2.1.2 → 2.1.3

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
  SHA256:
3
- metadata.gz: 9f27a6bc3d327dad98c500784066bcc9d31abda7b907ebd12519d02771caf92b
4
- data.tar.gz: 2d9ae244388348bbf9a31c4a8f74f6560f23fd3528a42d03afd4593989726574
3
+ metadata.gz: 30a1743ee37172a7bafb419ac76024d6be11116adfab72ad08f5769aa8a37d8e
4
+ data.tar.gz: f2fa556715d1336c6bcf0c742e17d0c25f041bf2c699fd061ef9583c6ed1f963
5
5
  SHA512:
6
- metadata.gz: e499f76d38811108f38571d44a69d049800fa816ac89e1cf7d96048199aebff6894abc86ad702c2d831960826b3b9cf19b15cb9b67224d6941e5cceb636ff704
7
- data.tar.gz: e335ed09bef247098f795cbf65369109ce0cfdabe285afd7774e5474af56661f9d8396228120289006ed39ceefc3e4dcc87814f36457aac9a666e936654edf16
6
+ metadata.gz: 16f9be7983f67ed6a8b0fd0b44aa0a6c00d37170eb7ce23424c3dfd5ccf88cc59bf168c0704b7453e728fd4f695247a4e9ea9a0475b9689724d9ac895481f130
7
+ data.tar.gz: 85dbd2d5960f6520db8a6a2b7c3afda4bbdf9924acaaf146070df19485ed66076818c05e93fb0d09f3fbcff9e5d2e6189307953acdd0e37d4f821e3e5f2433b7
@@ -89,7 +89,9 @@ module Libis
89
89
  # @param [Integer] max max count.
90
90
  def status_progress(task, progress = nil, max = nil)
91
91
  log_entry = self.status_entry(task)
92
- log_entry ||= self.add_status_log('task' => task, 'status' => :STARTED, 'created' => DateTime.now)
92
+ if log_entry.nil? || STATUS[status_symbol(log_entry['status'])] >= STATUS[:DONE]
93
+ log_entry = self.add_status_log('task' => task, 'status' => :STARTED, 'created' => DateTime.now)
94
+ end
93
95
  log_entry['progress'] = progress ? progress : (log_entry['progress'] || 0) + 1
94
96
  log_entry['max'] = max if max
95
97
  log_entry['updated'] = DateTime.now
@@ -1,5 +1,5 @@
1
1
  module Libis
2
2
  module Workflow
3
- VERSION = '2.1.2' unless const_defined? :VERSION # the guard is against a redefinition warning that happens on Travis
3
+ VERSION = '2.1.3' 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.1.2
4
+ version: 2.1.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kris Dekeyser
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-05-14 00:00:00.000000000 Z
11
+ date: 2020-05-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rake