dynflow 0.7.0 → 0.7.1

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.
@@ -1,3 +1,3 @@
1
1
  module Dynflow
2
- VERSION = '0.7.0'
2
+ VERSION = '0.7.1'
3
3
  end
@@ -145,7 +145,7 @@ module Dynflow
145
145
  # to fix the orphaned plans as well.
146
146
  def consistency_check
147
147
  abnormal_execution_plans =
148
- self.persistence.find_execution_plans filters: { 'state' => %w(running planning) }
148
+ self.persistence.find_execution_plans filters: { 'state' => %w(planning running) }
149
149
  if abnormal_execution_plans.empty?
150
150
  logger.info 'Clean start.'
151
151
  else
@@ -169,6 +169,13 @@ module Dynflow
169
169
  else
170
170
  raise
171
171
  end
172
+ ep.steps.values.each do |step|
173
+ if [:suspended, :running].include?(step.state)
174
+ step.error = ExecutionPlan::Steps::Error.new("Abnormal termination (previous state: #{step.state})")
175
+ step.state = :error
176
+ step.save
177
+ end
178
+ end
172
179
  end
173
180
  end
174
181
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: dynflow
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.7.0
4
+ version: 0.7.1
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-06-10 00:00:00.000000000 Z
12
+ date: 2014-06-13 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: activesupport