diff options
author | Tomasz Maczukin <tomasz@maczukin.pl> | 2017-03-01 13:56:54 +0100 |
---|---|---|
committer | Tomasz Maczukin <tomasz@maczukin.pl> | 2017-03-01 13:56:54 +0100 |
commit | 44ef6806cab0b4bca3d94f9254fd1c34f350ed72 (patch) | |
tree | 95881c8863ba0a8c39cf68bf74278ca5f77c15f4 /app/workers | |
parent | 6db7c232f402b677e9a613161e419141017232b9 (diff) | |
download | gitlab-ce-44ef6806cab0b4bca3d94f9254fd1c34f350ed72.tar.gz |
Fix rubocop offenses
Diffstat (limited to 'app/workers')
-rw-r--r-- | app/workers/stuck_ci_builds_worker.rb | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/app/workers/stuck_ci_builds_worker.rb b/app/workers/stuck_ci_builds_worker.rb index e9bd3f180b7..c89c5832afd 100644 --- a/app/workers/stuck_ci_builds_worker.rb +++ b/app/workers/stuck_ci_builds_worker.rb @@ -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 |