Skip to content

Commit

Permalink
Fixed chronos-sync name collision.
Browse files Browse the repository at this point in the history
  • Loading branch information
Brenden Matthews committed Mar 13, 2014
1 parent a0d978f commit 3cf43c4
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions bin/chronos-sync.rb
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,10 @@ def write_job(f, job)
remaining_attempts = 100
while !dependent_jobs_to_be_updated.empty? && remaining_attempts > 0
remaining_attempts -= 1
jobs = dependent_jobs_to_be_updated.dup
these_jobs = dependent_jobs_to_be_updated.dup
to_delete = []
jobs.each_index do |idx|
job = jobs[idx][:new]
these_jobs.each_index do |idx|
job = these_jobs[idx][:new]
parents = job['parents']
# Add only the jobs for which their parents have already been added.
can_be_added = true
Expand All @@ -216,7 +216,7 @@ def write_job(f, job)
end
end
if can_be_added
jobs_to_be_updated << jobs[idx]
jobs_to_be_updated << these_jobs[idx]
to_delete << idx
dependent_jobs_to_be_updated_set.delete(job['name'])
end
Expand Down

0 comments on commit 3cf43c4

Please sign in to comment.