diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-11 15:10:57 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-11-11 15:10:57 +0000 |
commit | e40f19ef830c5863089bc6a7a73e6695efa60a13 (patch) | |
tree | c540032381175c4e95e3b6378698f91acac5100f /lib/gitlab/sidekiq_status.rb | |
parent | 1c7411c597334e20d2e92cc948f0699d339d2710 (diff) | |
download | gitlab-ce-e40f19ef830c5863089bc6a7a73e6695efa60a13.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'lib/gitlab/sidekiq_status.rb')
-rw-r--r-- | lib/gitlab/sidekiq_status.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/gitlab/sidekiq_status.rb b/lib/gitlab/sidekiq_status.rb index 623fdd89456..fbf2718d718 100644 --- a/lib/gitlab/sidekiq_status.rb +++ b/lib/gitlab/sidekiq_status.rb @@ -7,12 +7,16 @@ module Gitlab # To check if a job has been completed, simply pass the job ID to the # `completed?` method: # - # job_id = SomeWorker.perform_async(...) + # job_id = SomeWorker.with_status.perform_async(...) # # if Gitlab::SidekiqStatus.completed?(job_id) # ... # end # + # If you do not use `with_status`, and the worker class does not declare + # `status_expiration` in its `sidekiq_options`, then this status will not be + # stored. + # # For each job ID registered a separate key is stored in Redis, making lookups # much faster than using Sidekiq's built-in job finding/status API. These keys # expire after a certain period of time to prevent storing too many keys in |