Updated the function submit_query_input_in_chunks, but reducing the number of initial jobs, the default slice length, and adding an if block to control the submission of the first batch of jobs
This commit is contained in:
parent
7cca77380b
commit
705f84454d
54
Gemfile.lock
54
Gemfile.lock
|
@ -1,43 +1,45 @@
|
||||||
GEM
|
GEM
|
||||||
remote: https://rubygems.org/
|
remote: https://rubygems.org/
|
||||||
specs:
|
specs:
|
||||||
activemodel (4.2.6)
|
activemodel (5.1.3)
|
||||||
activesupport (= 4.2.6)
|
activesupport (= 5.1.3)
|
||||||
|
activemodel-serializers-xml (1.0.2)
|
||||||
|
activemodel (> 5.x)
|
||||||
|
activesupport (> 5.x)
|
||||||
builder (~> 3.1)
|
builder (~> 3.1)
|
||||||
activeresource (4.1.0)
|
activeresource (5.0.0)
|
||||||
activemodel (~> 4.0)
|
activemodel (>= 5.0, < 6)
|
||||||
activesupport (~> 4.0)
|
activemodel-serializers-xml (~> 1.0)
|
||||||
rails-observers (~> 0.1.2)
|
activesupport (>= 5.0, < 6)
|
||||||
activesupport (4.2.6)
|
activesupport (5.1.3)
|
||||||
|
concurrent-ruby (~> 1.0, >= 1.0.2)
|
||||||
i18n (~> 0.7)
|
i18n (~> 0.7)
|
||||||
json (~> 1.7, >= 1.7.7)
|
|
||||||
minitest (~> 5.1)
|
minitest (~> 5.1)
|
||||||
thread_safe (~> 0.3, >= 0.3.4)
|
|
||||||
tzinfo (~> 1.1)
|
tzinfo (~> 1.1)
|
||||||
builder (3.2.2)
|
builder (3.2.3)
|
||||||
domain_name (0.5.20160309)
|
concurrent-ruby (1.0.5)
|
||||||
|
domain_name (0.5.20170404)
|
||||||
unf (>= 0.0.5, < 1.0.0)
|
unf (>= 0.0.5, < 1.0.0)
|
||||||
http-cookie (1.0.2)
|
http-cookie (1.0.3)
|
||||||
domain_name (~> 0.5)
|
domain_name (~> 0.5)
|
||||||
i18n (0.7.0)
|
i18n (0.8.6)
|
||||||
json (1.8.3)
|
mime-types (3.1)
|
||||||
mime-types (2.99.1)
|
mime-types-data (~> 3.2015)
|
||||||
minitest (5.9.0)
|
mime-types-data (3.2016.0521)
|
||||||
|
minitest (5.10.3)
|
||||||
netrc (0.11.0)
|
netrc (0.11.0)
|
||||||
openbabel (2.3.2.2)
|
openbabel (2.3.2.2)
|
||||||
rails-observers (0.1.2)
|
rest-client (2.0.2)
|
||||||
activemodel (~> 4.0)
|
|
||||||
rest-client (1.8.0)
|
|
||||||
http-cookie (>= 1.0.2, < 2.0)
|
http-cookie (>= 1.0.2, < 2.0)
|
||||||
mime-types (>= 1.16, < 3.0)
|
mime-types (>= 1.16, < 4.0)
|
||||||
netrc (~> 0.7)
|
netrc (~> 0.8)
|
||||||
thread_safe (0.3.5)
|
thread_safe (0.3.6)
|
||||||
tzinfo (1.2.2)
|
tzinfo (1.2.3)
|
||||||
thread_safe (~> 0.1)
|
thread_safe (~> 0.1)
|
||||||
unf (0.1.4)
|
unf (0.1.4)
|
||||||
unf_ext
|
unf_ext
|
||||||
unf_ext (0.0.7.2)
|
unf_ext (0.0.7.4)
|
||||||
yard (0.8.7.6)
|
yard (0.9.9)
|
||||||
|
|
||||||
PLATFORMS
|
PLATFORMS
|
||||||
ruby
|
ruby
|
||||||
|
@ -49,4 +51,4 @@ DEPENDENCIES
|
||||||
yard
|
yard
|
||||||
|
|
||||||
BUNDLED WITH
|
BUNDLED WITH
|
||||||
1.11.2
|
1.14.6
|
||||||
|
|
|
@ -215,7 +215,7 @@ module ClassyFireAPI
|
||||||
k = 0
|
k = 0
|
||||||
for k in (i...(i + initial_nr_of_jobs))
|
for k in (i...(i + initial_nr_of_jobs))
|
||||||
title = File.basename(absolute_path).split(".")[0] + "_yannick" + "_part_#{k}"
|
title = File.basename(absolute_path).split(".")[0] + "_yannick" + "_part_#{k}"
|
||||||
i = i + 1
|
|
||||||
begin
|
begin
|
||||||
puts "submitting #{title}"
|
puts "submitting #{title}"
|
||||||
q = submit_query(title,subdivised_groups[k-1].join("\n"),type)
|
q = submit_query(title,subdivised_groups[k-1].join("\n"),type)
|
||||||
|
@ -226,6 +226,7 @@ module ClassyFireAPI
|
||||||
puts e.message
|
puts e.message
|
||||||
puts e.backtrace.inspect
|
puts e.backtrace.inspect
|
||||||
end
|
end
|
||||||
|
i = i + 1
|
||||||
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."
|
||||||
|
|
Loading…
Reference in New Issue