Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.7.97
3.7.98
8 changes: 7 additions & 1 deletion lib/gooddata/lcm/actions/synchronize_ldm.rb
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,9 @@ class SynchronizeLdm < BaseAction

description 'Sync failed list'
param :sync_failed_list, instance_of(Type::HashType), required: false

description 'Number Of Threads'
param :number_of_threads_synchronize_ldm, instance_of(Type::StringType), required: false, default: '10'
end

RESULT_HEADER = %i[from to status]
Expand Down Expand Up @@ -91,6 +94,9 @@ def sync_segment_ldm(params, segment_info)
exclude_fact_rule = params.exclude_fact_rule.to_b
include_deprecated = params.include_deprecated.to_b
update_preference = params[:update_preference]
number_of_threads = Integer(params.number_of_threads_synchronize_ldm || '10')
GoodData.logger.info "Number of threads using synchronize logical data model #{number_of_threads}"

exist_fallback_to_hard_sync_config = !update_preference.nil? && !update_preference[:fallback_to_hard_sync].nil?
include_maql_fallback_hard_sync = exist_fallback_to_hard_sync_config && Helpers.to_bool('fallback_to_hard_sync', update_preference[:fallback_to_hard_sync])

Expand Down Expand Up @@ -141,7 +147,7 @@ def sync_segment_ldm(params, segment_info)
end
end

segment_info[:to] = segment_info[:to].pmap do |entry|
segment_info[:to] = segment_info[:to].pmap(number_of_threads) do |entry|
update_status = true
pid = entry[:pid]
next if sync_failed_project(pid, params)
Expand Down