Class: Spree::MaintenanceTasks::UpgradeStep
- Inherits:
-
Spree::MaintenanceTask
- Object
- Spree::MaintenanceTask
- Spree::MaintenanceTasks::UpgradeStep
- Defined in:
- app/maintenance_tasks/spree/maintenance_tasks/upgrade_step.rb
Overview
Runs one rake-backed step of an upgrade manifest, so a shell walk and a dashboard run leave the same audit record (docs/plans/6.0-maintenance-tasks.md).
Every one-pass step names its rake task in the manifest and runs here, so the rake body stays the only implementation. A step gets a task class of its own only when it walks rows (progress, resume, dry run) or asks the operator for parameters.
Constant Summary
Constants inherited from Spree::MaintenanceTask
Spree::MaintenanceTask::DEFAULT_BATCH_SIZE, Spree::MaintenanceTask::MAX_RUN_TIME, Spree::MaintenanceTask::RAKE_LOAD_LOCK
Instance Attribute Summary
Attributes inherited from Spree::MaintenanceTask
Instance Method Summary collapse
-
#manifest_step ⇒ Hash?
The manifest entry this run is executing, resolved across every manifest rather than a fixed one — the walker may be part way through a multi-release upgrade.
- #process ⇒ Object
Methods inherited from Spree::MaintenanceTask
#after_complete, api_type_for, #collection, collection_batch_size, #count, #dry_run?, find_by_api_type, find_registered, #invoke_rake_task, no_collection, #no_collection?, #rake_file_defining, registered_classes, supports_dry_run, #tallies, #tally
Methods included from ApiTyped
#api_type, api_type_for, #api_typed_family, class_name_for, find, registered_class
Instance Method Details
#manifest_step ⇒ Hash?
The manifest entry this run is executing, resolved across every manifest rather than a fixed one — the walker may be part way through a multi-release upgrade.
28 29 30 |
# File 'app/maintenance_tasks/spree/maintenance_tasks/upgrade_step.rb', line 28 def manifest_step @manifest_step ||= Spree::Upgrade.find_step(step_id) end |
#process ⇒ Object
19 20 21 |
# File 'app/maintenance_tasks/spree/maintenance_tasks/upgrade_step.rb', line 19 def process invoke_rake_task(manifest_step.fetch('task')) end |