Class: Gitlab::Ci::Pipeline::Chain::Limit::Deployments
- Extended by:
- Utils::Override
- Includes:
- Helpers
- Defined in:
- lib/gitlab/ci/pipeline/chain/limit/deployments.rb
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
- #break? ⇒ Boolean
-
#initialize ⇒ Deployments
constructor
A new instance of Deployments.
- #perform! ⇒ Object
Methods included from Utils::Override
extended, extensions, included, method_added, override, prepended, queue_verification, verify!
Methods included from Helpers
Constructor Details
#initialize ⇒ Deployments
Returns a new instance of Deployments.
15 16 17 18 19 20 |
# File 'lib/gitlab/ci/pipeline/chain/limit/deployments.rb', line 15 def initialize(*) super @limit = ::Gitlab::Ci::Pipeline::Quota::Deployments .new(project.namespace, pipeline, command) end |
Instance Method Details
#break? ⇒ Boolean
31 32 33 |
# File 'lib/gitlab/ci/pipeline/chain/limit/deployments.rb', line 31 def break? limit.exceeded? end |
#perform! ⇒ Object
23 24 25 26 27 28 |
# File 'lib/gitlab/ci/pipeline/chain/limit/deployments.rb', line 23 def perform! return unless limit.exceeded? limit.log_error!(project_id: project.id, plan: project.actual_plan_name) error(limit., drop_reason: :deployments_limit_exceeded) end |