summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorYorick Peterse <yorickpeterse@gmail.com>2017-06-19 16:12:05 +0200
committerYorick Peterse <yorickpeterse@gmail.com>2017-06-19 16:14:07 +0200
commitd505a2b8e67998b8e6f9ab525e2ddd6c9298f51e (patch)
tree4477631595d9136feb2771a073245ff069c98bf3 /lib
parentb18c12ec6a9564d55bd2851a82ff2513b8485fe0 (diff)
downloadgitlab-ce-d505a2b8e67998b8e6f9ab525e2ddd6c9298f51e.tar.gz
Reduce wait timings for Sidekiq jobsreduce-sidekiq-wait-timings
This reduces the time spent waiting for Sidekiq jobs to complete in JobWaiter, and reduces the sleep interval when trying to acquire the lease for refreshing authorizations. These changes should reduce the time spent just waiting for a lock, which we seem to be spending most time in when running the AuthorizedProjectsWorker.
Diffstat (limited to 'lib')
-rw-r--r--lib/gitlab/job_waiter.rb2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/gitlab/job_waiter.rb b/lib/gitlab/job_waiter.rb
index 8db91d25a4b..208f0e1bbea 100644
--- a/lib/gitlab/job_waiter.rb
+++ b/lib/gitlab/job_waiter.rb
@@ -14,7 +14,7 @@ module Gitlab
# 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
# long to process, or is never processed.
- def wait(timeout = 60)
+ def wait(timeout = 10)
start = Time.current
while (Time.current - start) <= timeout