diff options
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 |