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.95
3.7.96
7 changes: 6 additions & 1 deletion lib/gooddata/lcm/actions/migrate_gdc_date_dimension.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ class MigrateGdcDateDimension < BaseAction

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

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

RESULT_HEADER = %i[from to status]
Expand All @@ -53,6 +56,8 @@ def call(params)
def migrate_date_dimension(params, segment_info)
results = []
client = params.gdc_gd_client
number_of_threads = Integer(params.number_of_threads_migrate_dates || '10')
GoodData.logger.info "Number of threads using migration dates #{number_of_threads}"
latest_blueprint = segment_info[:from_blueprint]
# don't migrate when latest master doesn't contain custom v2 date.
return results unless contain_v2?(latest_blueprint)
Expand All @@ -64,7 +69,7 @@ def migrate_date_dimension(params, segment_info)
collect_synced_status = collect_synced_status(params)
failed_projects = ThreadSafe::Array.new

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

Expand Down