Skip to content
代码片段 群组 项目
提交 c6a7ae1a 编辑于 作者: 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
No related branches found
No related tags found
无相关合并请求
...@@ -59,8 +59,10 @@ def perform_and_ttl(class_name, attempts_left) ...@@ -59,8 +59,10 @@ def perform_and_ttl(class_name, attempts_left)
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.'
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册