@@ -31,6 +31,9 @@ class MigrateGdcDateDimension < BaseAction
3131
3232 description 'Sync failed list'
3333 param :sync_failed_list , instance_of ( Type ::HashType ) , required : false
34+
35+ description 'Number Of Threads'
36+ param :number_of_threads_migrate_dates , instance_of ( Type ::StringType ) , required : false , default : '10'
3437 end
3538
3639 RESULT_HEADER = %i[ from to status ]
@@ -53,6 +56,8 @@ def call(params)
5356 def migrate_date_dimension ( params , segment_info )
5457 results = [ ]
5558 client = params . gdc_gd_client
59+ number_of_threads = Integer ( params . number_of_threads_migrate_dates || '10' )
60+ GoodData . logger . info "Number of threads using migration dates #{ number_of_threads } "
5661 latest_blueprint = segment_info [ :from_blueprint ]
5762 # don't migrate when latest master doesn't contain custom v2 date.
5863 return results unless contain_v2? ( latest_blueprint )
@@ -64,7 +69,7 @@ def migrate_date_dimension(params, segment_info)
6469 collect_synced_status = collect_synced_status ( params )
6570 failed_projects = ThreadSafe ::Array . new
6671
67- segment_info [ :to ] . pmap do |entry |
72+ segment_info [ :to ] . pmap ( number_of_threads ) do |entry |
6873 pid = entry [ :pid ]
6974 next if sync_failed_project ( pid , params )
7075
0 commit comments