- Updated ClassyFireAPI.submit_query_input_in_chunks

This commit is contained in:
djoumbou 2016-03-09 21:42:31 -07:00
parent 767a49fc07
commit 3891deaba4
1 changed files with 10 additions and 9 deletions

View File

@ -175,15 +175,17 @@ module ClassyFireAPI
while i < initial_nr_of_jobs while i < initial_nr_of_jobs
title = File.basename(absolute_path).split(".")[0] + "_yannick" + "_part_#{i}" title = File.basename(absolute_path).split(".")[0] + "_yannick" + "_part_#{i}"
begin if i <= subdivised_groups.length
puts "submitting #{title}" begin
q = submit_query(title,subdivised_groups[i-1].join("\n"),type) puts "submitting #{title}"
query_ids << JSON.parse(q)['id'] q = submit_query(title,subdivised_groups[i-1].join("\n"),type)
rescue Exception => e query_ids << JSON.parse(q)['id']
puts e.message rescue Exception => e
puts e.backtrace.inspect puts e.message
puts e.backtrace.inspect
end
i = i + 1
end end
i = i + 1
end end
puts "Going to sleep at #{Time.now - @start_time} for #{sleeping_time} s." puts "Going to sleep at #{Time.now - @start_time} for #{sleeping_time} s."
@ -202,7 +204,6 @@ module ClassyFireAPI
puts e.message puts e.message
puts e.backtrace.inspect puts e.backtrace.inspect
end end
end end
i = k i = k
puts "Going to sleep at #{Time.now - @start_time} for #{sleeping_time} s." puts "Going to sleep at #{Time.now - @start_time} for #{sleeping_time} s."