Refactor GeoRepositorySyncWorker#schedule_jobs

parent 4e6ac4c8
......@@ -99,9 +99,7 @@ class GeoRepositorySyncWorker
project_id = @pending_projects.shift
job_id = Geo::ProjectSyncWorker.perform_in(BACKOFF_DELAY, project_id, Time.now)
if job_id
@scheduled_jobs << { id: project_id, job_id: job_id }
end
@scheduled_jobs << { id: project_id, job_id: job_id } if job_id
end
end
......
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