Fix rubocop offenses

上级 6db7c232
......@@ -2,7 +2,7 @@ class StuckCiBuildsWorker
include Sidekiq::Worker
include CronjobQueue
EXCLUSIVE_LEASE_KEY = 'stuck_ci_builds_worker_lease'
EXCLUSIVE_LEASE_KEY = 'stuck_ci_builds_worker_lease'.freeze
BUILD_RUNNING_OUTDATED_TIMEOUT = 1.hour
BUILD_PENDING_OUTDATED_TIMEOUT = 1.day
......@@ -23,10 +23,7 @@ class StuckCiBuildsWorker
private
def try_obtain_lease
@uuid = Gitlab::ExclusiveLease.new(
EXCLUSIVE_LEASE_KEY,
timeout: 30.minutes
).try_obtain
@uuid = Gitlab::ExclusiveLease.new(EXCLUSIVE_LEASE_KEY, timeout: 30.minutes).try_obtain
end
def remove_lease
......
......@@ -126,4 +126,4 @@ describe StuckCiBuildsWorker do
worker.perform
end
end
end
\ No newline at end of file
end
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册