diff options
author | Nick Thomas <nick@gitlab.com> | 2019-07-03 14:46:13 +0100 |
---|---|---|
committer | Nick Thomas <nick@gitlab.com> | 2019-07-04 08:45:14 +0100 |
commit | 9ef0c8559de925d0a72a3fe421d95209c2b81d8f (patch) | |
tree | 4bae18952a1ff2cc29d49331b9e9ae0e9d32b65e | |
parent | 9a4b5f08dbf5e0900145b5127f50e7ab3578d05c (diff) | |
download | gitlab-ce-9ef0c8559de925d0a72a3fe421d95209c2b81d8f.tar.gz |
Clarify documentation of Gitlab::SidekiqStatus
The "running" state is ambiguous. Clarify that it covers both enqueued
and actually running jobs.
-rw-r--r-- | lib/gitlab/sidekiq_status.rb | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/gitlab/sidekiq_status.rb b/lib/gitlab/sidekiq_status.rb index 583a970bf4e..0f890a12134 100644 --- a/lib/gitlab/sidekiq_status.rb +++ b/lib/gitlab/sidekiq_status.rb @@ -53,14 +53,14 @@ module Gitlab self.num_running(job_ids).zero? end - # Returns true if the given job is running + # Returns true if the given job is running or enqueued. # # job_id - The Sidekiq job ID to check. def self.running?(job_id) num_running([job_id]) > 0 end - # Returns the number of jobs that are running. + # Returns the number of jobs that are running or enqueued. # # job_ids - The Sidekiq job IDs to check. def self.num_running(job_ids) @@ -81,7 +81,7 @@ module Gitlab # job_ids - The Sidekiq job IDs to check. # # Returns an array of true or false indicating job completion. - # true = job is still running + # true = job is still running or enqueued # false = job completed def self.job_status(job_ids) keys = job_ids.map { |jid| key_for(jid) } |