RemoteStorage¶
Defined in dccd.daemon.storage
- class RemoteStorage(config)[source]
Bases:
objectPush local data directories to remote destinations via rclone.
If no remotes are configured,
pushis a silent no-op and data is kept on the daemon host only.- Parameters:
- configStorageConfig
Storage configuration (local path + optional rclone remotes).
- check_rclone()[source]
Check whether rclone is available in PATH (result is cached).
- Returns:
- bool
Trueif rclone is found,Falseotherwise.
- push(local_path)[source]
Copy local_path to all configured remote destinations.
The remote target mirrors the relative directory structure under
config.local_path. For example, iflocal_pathis/data/crypto/Binanceandconfig.local_pathis/data/crypto, the target will be<remote>/Binance. Iflocal_pathequalsconfig.local_path(root sync), the contents are copied directly into each remote root.- Parameters:
- local_pathstr or pathlib.Path
Absolute path of the directory to synchronise.
Notes
This method never raises — failures are logged as errors so that a remote-push failure does not interrupt the local collection loop.