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
1
Merge Requests
1
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
nexedi
gitlab-ce
Commits
5544d2b3
Commit
5544d2b3
authored
Jun 19, 2017
by
Rémy Coutable
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'reduce-sidekiq-wait-timings' into 'master'
Reduce wait timings for Sidekiq jobs See merge request !12270
parents
757c537f
d505a2b8
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
6 additions
and
2 deletions
+6
-2
app/services/users/refresh_authorized_projects_service.rb
app/services/users/refresh_authorized_projects_service.rb
+1
-1
changelogs/unreleased/reduce-sidekiq-wait-timings.yml
changelogs/unreleased/reduce-sidekiq-wait-timings.yml
+4
-0
lib/gitlab/job_waiter.rb
lib/gitlab/job_waiter.rb
+1
-1
No files found.
app/services/users/refresh_authorized_projects_service.rb
View file @
5544d2b3
...
@@ -34,7 +34,7 @@ module Users
...
@@ -34,7 +34,7 @@ module Users
# Keep trying until we obtain the lease. If we don't do so we may end up
# Keep trying until we obtain the lease. If we don't do so we may end up
# not updating the list of authorized projects properly. To prevent
# not updating the list of authorized projects properly. To prevent
# hammering Redis too much we'll wait for a bit between retries.
# hammering Redis too much we'll wait for a bit between retries.
sleep
(
1
)
sleep
(
0.
1
)
end
end
begin
begin
...
...
changelogs/unreleased/reduce-sidekiq-wait-timings.yml
0 → 100644
View file @
5544d2b3
---
title
:
Reduce time spent waiting for certain Sidekiq jobs to complete
merge_request
:
author
:
lib/gitlab/job_waiter.rb
View file @
5544d2b3
...
@@ -14,7 +14,7 @@ module Gitlab
...
@@ -14,7 +14,7 @@ module Gitlab
# timeout - The maximum amount of seconds to block the caller for. This
# timeout - The maximum amount of seconds to block the caller for. This
# ensures we don't indefinitely block a caller in case a job takes
# ensures we don't indefinitely block a caller in case a job takes
# long to process, or is never processed.
# long to process, or is never processed.
def
wait
(
timeout
=
6
0
)
def
wait
(
timeout
=
1
0
)
start
=
Time
.
current
start
=
Time
.
current
while
(
Time
.
current
-
start
)
<=
timeout
while
(
Time
.
current
-
start
)
<=
timeout
...
...
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