.. _dootle.jobs.shadow: ================== dootle.jobs.shadow ================== .. py:module:: dootle.jobs.shadow .. autoapi-nested-parse:: See EOF for license/metadata/notes as applicable Functions --------- .. autoapisummary:: dootle.jobs.shadow._shadow_paths Classes ------- .. autoapisummary:: dootle.jobs.shadow.InjectShadowAction dootle.jobs.shadow.InjectMultiShadow dootle.jobs.shadow.CalculateShadowDirs dootle.jobs.shadow.MultiBackupAction Module Contents =============== .. py:function:: _shadow_paths(rpath: pathlib.Path, shadow_roots: list[pathlib.Path]) -> list[pathlib.Path] take a relative path, apply it onto a multiple roots to the shadow directories .. _dootle.jobs.shadow.InjectShadowAction: .. py:class:: InjectShadowAction Inject a shadow path into each task entry, using the target key which points to the relative path to shadow returns the *directory* of the shadow target registered as: job.inject.shadow .. _dootle.jobs.shadow.InjectMultiShadow: .. py:class:: InjectMultiShadow Inject multiple shadow paths into each task entry, using the target key which points to the relative path to shadow injects 'shadow_paths', a list of paths For use with multibackupaction, .. _dootle.jobs.shadow.CalculateShadowDirs: .. py:class:: CalculateShadowDirs Take a relative path, and apply it to a list of shadow roots, adding 'shadow_paths' to the task state .. _dootle.jobs.shadow.MultiBackupAction: .. py:class:: MultiBackupAction copy a file somewhere, but only if it doesn't exist at the dest, or is newer than the dest The arguments of the action are held in self.spec uses 'shadow_paths', a list of directories to backup to, using 'pattern', which will be expanded with an implicit variable 'shadow_path' will create the destination directory if necessary