dynflow 1.6.6 → 1.6.8
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: e8f8620a4de5e01dbd253d659f07f4221a41a88112c7ca9b1440591bfc0a7b2f
|
4
|
+
data.tar.gz: 13d941834dc18889bef6c0bf8bee95f5286104974fa0ded2bb9a5ffda6f6ea81
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: f84d05b76492e25562a8cb06628bfd69f8d7f5a28b62d9bdd97469db206c8d0378209609376283c21fa664a7b13587df1babc828f92f15e58e95fe5ad411a85c
|
7
|
+
data.tar.gz: fbb2db621fb8903f314cb061258230b5c0567c4aaf6beb8e051027f4206c2a14ed2c734b90160437060c5fa36823c7febb946d7b41d5d974d798b58410e083e5
|
@@ -3,6 +3,12 @@ module Dynflow
|
|
3
3
|
module Action::WithSubPlans
|
4
4
|
include Dynflow::Action::Cancellable
|
5
5
|
|
6
|
+
class SubtaskFailedException < RuntimeError
|
7
|
+
def backtrace
|
8
|
+
[]
|
9
|
+
end
|
10
|
+
end
|
11
|
+
|
6
12
|
SubPlanFinished = Algebrick.type do
|
7
13
|
fields! :execution_plan_id => String,
|
8
14
|
:success => type { variants TrueClass, FalseClass }
|
@@ -228,7 +234,7 @@ module Dynflow
|
|
228
234
|
end
|
229
235
|
|
230
236
|
def check_for_errors!
|
231
|
-
|
237
|
+
raise SubtaskFailedException.new("A sub task failed") if output[:failed_count] > 0
|
232
238
|
end
|
233
239
|
|
234
240
|
def uses_concurrency_control
|
@@ -335,6 +335,8 @@ module Dynflow
|
|
335
335
|
if value
|
336
336
|
record = prepare_record(what, value, (existing_record || condition), with_data)
|
337
337
|
if existing_record
|
338
|
+
record = prune_unchanged(what, existing_record, record)
|
339
|
+
return value if record.empty?
|
338
340
|
condition = update_conditions.merge(condition)
|
339
341
|
return with_retry { table.where(condition).update(record) }
|
340
342
|
else
|
@@ -356,6 +358,14 @@ module Dynflow
|
|
356
358
|
end
|
357
359
|
end
|
358
360
|
|
361
|
+
def prune_unchanged(what, object, record)
|
362
|
+
record = record.dup
|
363
|
+
table(what).columns.each do |column|
|
364
|
+
record.delete(column) if object[column] == record[column]
|
365
|
+
end
|
366
|
+
record
|
367
|
+
end
|
368
|
+
|
359
369
|
alias_method :load, :load_record
|
360
370
|
|
361
371
|
def load_records(what, condition, keys = nil)
|
@@ -127,8 +127,12 @@ module Dynflow
|
|
127
127
|
db_pool_size = calculate_db_pool_size(world)
|
128
128
|
::ActiveRecord::Base.connection_pool.disconnect!
|
129
129
|
|
130
|
-
|
131
|
-
config =
|
130
|
+
base_config = ::ActiveRecord::Base.configurations.configs_for(env_name: ::Rails.env)[0]
|
131
|
+
config = if base_config.respond_to?(:configuration_hash)
|
132
|
+
::Dynflow::Utils::IndifferentHash.new(base_config.configuration_hash.dup)
|
133
|
+
else
|
134
|
+
base_config.config.dup
|
135
|
+
end
|
132
136
|
config['pool'] = db_pool_size if config['pool'].to_i < db_pool_size
|
133
137
|
::ActiveRecord::Base.establish_connection(config)
|
134
138
|
end
|
@@ -159,8 +163,12 @@ module Dynflow
|
|
159
163
|
protected
|
160
164
|
|
161
165
|
def default_sequel_adapter_options(world)
|
162
|
-
|
163
|
-
db_config
|
166
|
+
base_config = ::ActiveRecord::Base.configurations.configs_for(env_name: ::Rails.env)[0]
|
167
|
+
db_config = if base_config.respond_to?(:configuration_hash)
|
168
|
+
::Dynflow::Utils::IndifferentHash.new(base_config.configuration_hash.dup)
|
169
|
+
else
|
170
|
+
base_config.config.dup
|
171
|
+
end
|
164
172
|
db_config['adapter'] = db_config['adapter'].gsub(/_?makara_?/, '')
|
165
173
|
db_config['adapter'] = 'postgres' if db_config['adapter'] == 'postgresql'
|
166
174
|
db_config['max_connections'] = calculate_db_pool_size(world) if increase_db_pool_size?
|
data/lib/dynflow/version.rb
CHANGED
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: 1.6.
|
4
|
+
version: 1.6.8
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ivan Necas
|
@@ -9,7 +9,7 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2022-
|
12
|
+
date: 2022-12-06 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
15
|
name: multi_json
|
@@ -678,7 +678,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
678
678
|
- !ruby/object:Gem::Version
|
679
679
|
version: '0'
|
680
680
|
requirements: []
|
681
|
-
rubygems_version: 3.
|
681
|
+
rubygems_version: 3.3.20
|
682
682
|
signing_key:
|
683
683
|
specification_version: 4
|
684
684
|
summary: DYNamic workFLOW engine
|