SyncService¶
Defined in dccd.daemon.stream_manager
- class SyncService(config)[source]
Bases:
objectPeriodically push the entire local data directory to all remotes.
This is the single point of truth for remote synchronisation. Neither histo jobs nor stream threads push data themselves — they save locally and rely on this service to replicate to remote destinations.
- Parameters:
- configStorageConfig
Storage configuration (
remoteslist +sync_interval).
Notes
If
config.remotesis empty orconfig.sync_intervalis 0, the service is a no-op and no background thread is started.- start()[source]
Start the background sync thread (idempotent).
- stop()[source]
Signal the sync thread to stop at the next interval boundary.
- sync_now()[source]
Push
local_pathto all remotes immediately (blocking).On success, the timestamp and remote list are recorded in
{local_path}/.dccd/last_sync.jsonso the web UI can display the last sync time without inspecting rclone output.