pub struct SyncProgress {Show 17 fields
pub activities: StreamProgress,
pub gpx: StreamProgress,
pub health: StreamProgress,
pub performance: StreamProgress,
pub start_time: Instant,
pub profile_name: Mutex<String>,
pub date_range: Mutex<String>,
pub latest_range: Mutex<Option<(String, String)>>,
pub backfill_range: Mutex<Option<(String, String)>>,
pub rate_history: Mutex<Vec<u32>>,
pub total_requests: AtomicU32,
pub errors: Mutex<Vec<ErrorEntry>>,
pub storage_path: Mutex<String>,
pub is_planning: AtomicBool,
pub shutdown: AtomicBool,
pub planning_step: Mutex<PlanningStep>,
pub oldest_activity_date: Mutex<Option<String>>,
/* private fields */
}Expand description
Overall sync progress across all streams
Fields§
§activities: StreamProgressActivities stream progress
gpx: StreamProgressGPX downloads progress
health: StreamProgressHealth data progress
performance: StreamProgressPerformance metrics progress
start_time: InstantStart time for ETA calculation
profile_name: Mutex<String>User profile name
date_range: Mutex<String>Date range being synced (legacy, kept for compatibility)
latest_range: Mutex<Option<(String, String)>>Latest sync date range (from -> to)
backfill_range: Mutex<Option<(String, String)>>Backfill date range (frontier -> target, syncing backwards)
rate_history: Mutex<Vec<u32>>Request rate history (last 60 seconds)
total_requests: AtomicU32Total requests made
errors: Mutex<Vec<ErrorEntry>>Error details for display
storage_path: Mutex<String>Storage path for display
is_planning: AtomicBoolWhether we’re in planning phase
shutdown: AtomicBoolWhether shutdown has been requested
planning_step: Mutex<PlanningStep>Current planning step
oldest_activity_date: Mutex<Option<String>>Oldest activity date found during planning
Implementations§
Source§impl SyncProgress
impl SyncProgress
Sourcepub fn set_planning_step(&self, step: PlanningStep)
pub fn set_planning_step(&self, step: PlanningStep)
Set planning step
Sourcepub fn get_planning_step(&self) -> PlanningStep
pub fn get_planning_step(&self) -> PlanningStep
Get current planning step
Sourcepub fn finish_planning(&self)
pub fn finish_planning(&self)
Mark planning as complete
Sourcepub fn is_planning(&self) -> bool
pub fn is_planning(&self) -> bool
Check if still planning
Sourcepub fn request_shutdown(&self)
pub fn request_shutdown(&self)
Request that progress reporting shuts down
Sourcepub fn should_shutdown(&self) -> bool
pub fn should_shutdown(&self) -> bool
Check if shutdown has been requested
Sourcepub fn set_oldest_activity_date(&self, date: &str)
pub fn set_oldest_activity_date(&self, date: &str)
Set oldest activity date found
Sourcepub fn get_oldest_activity_date(&self) -> Option<String>
pub fn get_oldest_activity_date(&self) -> Option<String>
Get oldest activity date
Sourcepub fn set_profile(&self, name: &str)
pub fn set_profile(&self, name: &str)
Set profile name
Sourcepub fn get_profile(&self) -> String
pub fn get_profile(&self) -> String
Get profile name
Sourcepub fn set_date_range(&self, from: &str, to: &str)
pub fn set_date_range(&self, from: &str, to: &str)
Set date range
Sourcepub fn get_date_range(&self) -> String
pub fn get_date_range(&self) -> String
Get date range
Sourcepub fn set_sync_mode(&self, mode: SyncMode)
pub fn set_sync_mode(&self, mode: SyncMode)
Set sync mode
Sourcepub fn get_sync_mode(&self) -> SyncMode
pub fn get_sync_mode(&self) -> SyncMode
Get sync mode
Sourcepub fn set_latest_range(&self, from: &str, to: &str)
pub fn set_latest_range(&self, from: &str, to: &str)
Set latest sync date range
Sourcepub fn get_latest_range(&self) -> Option<(String, String)>
pub fn get_latest_range(&self) -> Option<(String, String)>
Get latest sync date range
Sourcepub fn set_backfill_range(&self, frontier: &str, target: &str)
pub fn set_backfill_range(&self, frontier: &str, target: &str)
Set backfill date range (frontier -> target, syncing backwards)
Sourcepub fn get_backfill_range(&self) -> Option<(String, String)>
pub fn get_backfill_range(&self) -> Option<(String, String)>
Get backfill date range
Sourcepub fn set_storage_path(&self, path: &str)
pub fn set_storage_path(&self, path: &str)
Set storage path
Sourcepub fn get_storage_path(&self) -> String
pub fn get_storage_path(&self) -> String
Get storage path
Sourcepub fn get_errors(&self) -> Vec<ErrorEntry>
pub fn get_errors(&self) -> Vec<ErrorEntry>
Get all errors
Sourcepub fn get_current_task(&self) -> Option<String>
pub fn get_current_task(&self) -> Option<String>
Get current task description (finds first active stream)
Sourcepub fn record_request(&self)
pub fn record_request(&self)
Record a request for rate tracking
Sourcepub fn update_rate_history(&self)
pub fn update_rate_history(&self)
Update rate history (call once per second)
Sourcepub fn requests_per_minute(&self) -> u32
pub fn requests_per_minute(&self) -> u32
Get rate per minute (average over last minute)
Sourcepub fn elapsed_str(&self) -> String
pub fn elapsed_str(&self) -> String
Get elapsed time as formatted string
Sourcepub fn total_remaining(&self) -> u32
pub fn total_remaining(&self) -> u32
Get total items remaining across all streams
Sourcepub fn total_completed(&self) -> u32
pub fn total_completed(&self) -> u32
Get total completed across all streams
Sourcepub fn total_failed(&self) -> u32
pub fn total_failed(&self) -> u32
Get total failed across all streams
Sourcepub fn is_complete(&self) -> bool
pub fn is_complete(&self) -> bool
Check if all streams are complete
Sourcepub fn print_simple_status(&self)
pub fn print_simple_status(&self)
Print a status line for terminal progress reporting.