Class: Ci::Pipelines::ClearPersistentRefService
- Inherits:
-
CreatePersistentRefService
- Object
- CreatePersistentRefService
- Ci::Pipelines::ClearPersistentRefService
- Defined in:
- app/services/ci/pipelines/clear_persistent_ref_service.rb
Constant Summary
Constants inherited from CreatePersistentRefService
Ci::Pipelines::CreatePersistentRefService::CACHE_KEY, Ci::Pipelines::CreatePersistentRefService::TIMEOUT
Instance Method Summary collapse
Methods inherited from CreatePersistentRefService
Constructor Details
This class inherits a constructor from Ci::Pipelines::CreatePersistentRefService
Instance Method Details
#execute ⇒ Object
6 7 8 9 10 11 12 13 14 15 16 |
# File 'app/services/ci/pipelines/clear_persistent_ref_service.rb', line 6 def execute Rails.cache.delete(pipeline_persistent_ref_cache_key) if Feature.enabled?(:pipeline_delete_gitaly_refs_in_batches, pipeline.project) pipeline.persistent_ref.async_delete elsif Feature.enabled?(:pipeline_cleanup_ref_worker_async, pipeline.project) ::Ci::PipelineCleanupRefWorker.perform_async(pipeline.id) else pipeline.persistent_ref.delete end end |