Commit c6a7ae1a authored by Stan Hu's avatar Stan Hu

Merge branch '277432-fix-comment-in-app-workers-background_migration_worker-rb' into 'master'

Fix comment in app/workers/background_migration_worker.rb

See merge request gitlab-org/gitlab!47102
parents db2c7db2 9b34dcf8
...@@ -59,8 +59,10 @@ class BackgroundMigrationWorker # rubocop:disable Scalability/IdempotentWorker ...@@ -59,8 +59,10 @@ class BackgroundMigrationWorker # rubocop:disable Scalability/IdempotentWorker
database_unhealthy_counter.increment if lease_obtained && !healthy_db database_unhealthy_counter.increment if lease_obtained && !healthy_db
# If we've tried several times to get a lease with a healthy DB without success, just give up. # When the DB is unhealthy or the lease can't be obtained after several tries,
# Otherwise we could end up in an infinite rescheduling loop. # then give up on the job and log a warning. Otherwise we could end up in
# an infinite rescheduling loop. Jobs can be tracked in the database with the
# use of Gitlab::Database::BackgroundMigrationJob
if !perform && attempts_left < 0 if !perform && attempts_left < 0
msg = if !lease_obtained msg = if !lease_obtained
'Job could not get an exclusive lease after several tries. Giving up.' 'Job could not get an exclusive lease after several tries. Giving up.'
......
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