Module update_status

Module update_status 

Source
Expand description

Background update checking for ctoolbox.

This module handles automatic update checking at startup:

  • Generates a random time-of-day on first run and stores it in pc_settings
  • Spawns a detached task that waits until the scheduled time (or runs immediately if past) and checks for updates
  • Stores update status in memory accessible by other parts of the process

Structs§

PendingUpdate
Record of a pending update that has been fully downloaded and is ready to install. This is written to disk so it persists across restarts.
UpdateStatus
Status of available updates.

Enums§

StartupUpdateResult
Result of the startup update check.

Traits§

GetUpdateStatusIpcClientExt
Auto-generated IPC client extension for this method.

Functions§

apply_pending_startup_update
Checks if a previously downloaded update is ready on disk and starts the atomic upgrade if found.
check_startup_network_update
Runs the bounded network startup update check (without downloading).
check_startup_update
Checks for a pending downloaded update at startup and applies it if ready.
get_or_generate_update_check_time
Gets the update check time from settings, generating one if not present.
get_update_status
Gets the current update status as a JSON string.
spawn_update_checker
Spawns the background update checker task.