Make Rubocop happy

parent 88d0560e
...@@ -37,6 +37,7 @@ module Geo ...@@ -37,6 +37,7 @@ module Geo
@loops = 0 @loops = 0
end end
# rubocop:disable Gitlab/ModuleWithInstanceVariables
def perform(shard_name) def perform(shard_name)
@shard_name = shard_name @shard_name = shard_name
@start_time = Time.now.utc @start_time = Time.now.utc
...@@ -47,6 +48,7 @@ module Geo ...@@ -47,6 +48,7 @@ module Geo
schedule_jobs schedule_jobs
end end
end end
# rubocop:enable Gitlab/ModuleWithInstanceVariables
private private
......
...@@ -48,7 +48,9 @@ module Geo ...@@ -48,7 +48,9 @@ module Geo
update_jobs_in_progress update_jobs_in_progress
unless over_capacity? if over_capacity?
sleep(1)
else
# This will stream the results one by one # This will stream the results one by one
# until there are no more results to fetch. # until there are no more results to fetch.
result = connection.get_result result = connection.get_result
...@@ -58,8 +60,6 @@ module Geo ...@@ -58,8 +60,6 @@ module Geo
result.each do |row| result.each do |row|
schedule_job(row['id']) schedule_job(row['id'])
end end
else
sleep(1)
end end
end end
rescue => error rescue => error
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment