Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Tatuya Kamada
gitlab-ce
Commits
44ef6806
Commit
44ef6806
authored
Mar 01, 2017
by
Tomasz Maczukin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix rubocop offenses
parent
6db7c232
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
6 deletions
+3
-6
app/workers/stuck_ci_builds_worker.rb
app/workers/stuck_ci_builds_worker.rb
+2
-5
spec/workers/stuck_ci_builds_worker_spec.rb
spec/workers/stuck_ci_builds_worker_spec.rb
+1
-1
No files found.
app/workers/stuck_ci_builds_worker.rb
View file @
44ef6806
...
...
@@ -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
...
...
spec/workers/stuck_ci_builds_worker_spec.rb
View file @
44ef6806
...
...
@@ -126,4 +126,4 @@ describe StuckCiBuildsWorker do
worker
.
perform
end
end
end
\ No newline at end of file
end
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment