MishkaCmsMigration. Resources. Validations. Connectable
(Mishka CMS Migration v0.0.1)
Copy Markdown
View Source
Holds a step that queues a job, Run again (:start_dry_run) and the jobs of picked items
(:dry_run_items, :import_items), on a run that still holds what its source connects with
(MishkaCmsMigration.MigrationRun.connectable?/1): its sealed password, or the file it was
handed. A run an earlier release ended cleared both, and its job could only fail on the source's
refusal, so it is refused before anything is queued, in words: "This run no longer holds its
WordPress password. Start a New import.", or its file, for a source that reads one.
update :start_dry_run do
validate MishkaCmsMigration.Resources.Validations.Connectable
endIt reads the run as the action was handed it, with no query, also when the action runs
atomically: a run's secret and file are cleared only by :cancel, which leaves it in a status
MishkaCmsMigration.Resources.Validations.Status refuses.