lib/rhoconnect/jobs/bulk_data_job.rb in rhoconnect-3.3.1.beta4 vs lib/rhoconnect/jobs/bulk_data_job.rb in rhoconnect-3.3.1

- old
+ new

@@ -135,11 +135,11 @@ (source_id,name,sync_priority,partition,sync_type,source_attribs,metadata,schema,blob_attribs,associations,last_inserted_size,backend_refresh_time) values (?,?,?,?,?,?,?,?,?,?,?,?)") do |stmt| sources_refs.each do |source_name,ref| s = ref[:source] stmt.execute(s.source_id,s.name,s.priority,s.partition_type.to_s, - s.sync_type.to_s,refs_to_s(ref[:refs]),s.get_value(:metadata),s.schema,s.blob_attribs,s.has_many,s.get_value(:md_size),s.read_state.refresh_time) + s.sync_type.to_s,refs_to_s(ref[:refs]),s.get_value(:metadata),s.schema,s.blob_attribs,s.has_many,s.get_value(:md_size).to_i,s.read_state.refresh_time) end end end end @@ -152,10 +152,10 @@ db = DBAdapter.instance.get_connection(bulk_data.dbfile) db.execute_batch(File.open(schema,'r').read) src_counter = 1 - bulk_data.sources[0, -1].each do |source_name| + bulk_data.partition_sources[0, -1].each do |source_name| timer = start_timer("start importing sqlite data for #{source_name}") source = Source.load(source_name,{:app_id => bulk_data.app_id, :user_id => bulk_data.user_id}) source.source_id = src_counter src_counter += 1 \ No newline at end of file