Commit 310e559c authored by Thong Kuah's avatar Thong Kuah

Merge branch 'loose-fk-adjust-ttl' into 'master'

Add better ttl value for loose FK cleanup worker

See merge request gitlab-org/gitlab!74278
parents d16e12b3 d94f078b
...@@ -13,7 +13,8 @@ module LooseForeignKeys ...@@ -13,7 +13,8 @@ module LooseForeignKeys
def perform def perform
return if Feature.disabled?(:loose_foreign_key_cleanup, default_enabled: :yaml) return if Feature.disabled?(:loose_foreign_key_cleanup, default_enabled: :yaml)
in_lock(self.class.name.underscore, ttl: 1.hour, retries: 0) do ttl = ModificationTracker::MAX_RUNTIME + 1.minute
in_lock(self.class.name.underscore, ttl: ttl, retries: 0) do
# TODO: Iterate over the connections # TODO: Iterate over the connections
# https://gitlab.com/gitlab-org/gitlab/-/issues/341513 # https://gitlab.com/gitlab-org/gitlab/-/issues/341513
stats = ProcessDeletedRecordsService.new(connection: ApplicationRecord.connection).execute stats = ProcessDeletedRecordsService.new(connection: ApplicationRecord.connection).execute
......
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