Class: Gitlab::Ci::Pipeline::Chain::Limit::ActiveJobs
- Inherits:
-
Base
- Object
- Base
- Gitlab::Ci::Pipeline::Chain::Limit::ActiveJobs
show all
- Includes:
- Helpers, Utils::StrongMemoize
- Defined in:
- lib/gitlab/ci/pipeline/chain/limit/active_jobs.rb
Constant Summary
collapse
- LIMIT_NAME =
:ci_active_jobs
- MESSAGE =
"Project exceeded the allowed number of jobs in active pipelines. Retry later."
Instance Attribute Summary
Attributes inherited from Base
#command, #config, #pipeline
Instance Method Summary
collapse
Methods included from Helpers
#error, #warning
Methods inherited from Base
#initialize
Instance Method Details
#break? ⇒ Boolean
30
31
32
|
# File 'lib/gitlab/ci/pipeline/chain/limit/active_jobs.rb', line 30
def break?
pipeline.errors.any?
end
|
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
# File 'lib/gitlab/ci/pipeline/chain/limit/active_jobs.rb', line 15
def perform!
return unless limits.exceeded?(LIMIT_NAME, count_jobs_in_alive_pipelines)
error(MESSAGE, failure_reason: :job_activity_limit_exceeded)
Gitlab::AppLogger.info(
class: self.class.name,
message: MESSAGE,
project_id: project.id,
plan: project.actual_plan_name,
project_path: project.path,
jobs_in_alive_pipelines_count: count_jobs_in_alive_pipelines
)
end
|