Module: Ductr::Store::PipelineStore
- Includes:
- PipelineSerializer
- Included in:
- Ductr::Store
- Defined in:
- lib/ductr/store/pipeline_store.rb
Overview
Pipeline’s level store interactions.
Constant Summary collapse
- PIPELINE_KEY_PREFIX =
Returns The pipeline key prefix.
"ductr:pipeline"
- PIPELINE_REGISTRY_KEY =
Returns The pipeline registry key.
"ductr:pipeline_registry"
Instance Method Summary collapse
-
#all_pipelines ⇒ Array<SerializedPipeline>
Get all known pipeline instances.
-
#register_pipeline(pipeline) ⇒ void
Add the given pipeline to the store’s pipeline registry.
-
#write_pipeline(pipeline) ⇒ void
Update the given pipeline.
Methods included from PipelineSerializer
Methods included from JobSerializer
Instance Method Details
#all_pipelines ⇒ Array<SerializedPipeline>
Get all known pipeline instances.
21 22 23 |
# File 'lib/ductr/store/pipeline_store.rb', line 21 def all_pipelines all(PIPELINE_REGISTRY_KEY, PIPELINE_KEY_PREFIX) end |
#register_pipeline(pipeline) ⇒ void
This method returns an undefined value.
Add the given pipeline to the store’s pipeline registry. This method is NOT thread-safe.
43 44 45 |
# File 'lib/ductr/store/pipeline_store.rb', line 43 def register_pipeline(pipeline) register(PIPELINE_REGISTRY_KEY, pipeline) end |
#write_pipeline(pipeline) ⇒ void
This method returns an undefined value.
Update the given pipeline.
32 33 34 |
# File 'lib/ductr/store/pipeline_store.rb', line 32 def write_pipeline(pipeline) write(PIPELINE_KEY_PREFIX, serialize_pipeline(pipeline)) end |