summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTomasz Maczukin <tomasz@maczukin.pl>2017-03-01 13:56:54 +0100
committerTomasz Maczukin <tomasz@maczukin.pl>2017-03-01 13:56:54 +0100
commit44ef6806cab0b4bca3d94f9254fd1c34f350ed72 (patch)
tree95881c8863ba0a8c39cf68bf74278ca5f77c15f4
parent6db7c232f402b677e9a613161e419141017232b9 (diff)
downloadgitlab-ce-44ef6806cab0b4bca3d94f9254fd1c34f350ed72.tar.gz
Fix rubocop offenses
-rw-r--r--app/workers/stuck_ci_builds_worker.rb7
-rw-r--r--spec/workers/stuck_ci_builds_worker_spec.rb2
2 files changed, 3 insertions, 6 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
diff --git a/spec/workers/stuck_ci_builds_worker_spec.rb b/spec/workers/stuck_ci_builds_worker_spec.rb
index 5b87718a795..82bdc2b14f3 100644
--- a/spec/workers/stuck_ci_builds_worker_spec.rb
+++ b/spec/workers/stuck_ci_builds_worker_spec.rb
@@ -126,4 +126,4 @@ describe StuckCiBuildsWorker do
worker.perform
end
end
-end \ No newline at end of file
+end