Method: Myreplicator::Loader.initial_loads

Defined in:
lib/loader/loader.rb

.initial_loads(initials) ⇒ Object

Loads all new tables concurrently multiple files



148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
# File 'lib/loader/loader.rb', line 148

def self.initial_loads initials
  procs = []

  initials.each do || 
    procs << Proc.new {
      Myreplicator::Log.run(:job_type => "loader", 
              :name => "#{.export_type}_import", 
              :file => .filename, 
              :export_id => .export_id) do |log|

        if Myreplicator::Loader.transfer_completed? 
          if .export_to == "vertica"
            Myreplicator::Loader.incremental_load 
          else
            Myreplicator::Loader.initial_load 
          end
          Myreplicator::Loader.cleanup 
        end

      end
    }
  end

  return procs
end