run_sync

Function run_sync 

Source
pub async fn run_sync(
    config: &Config,
    connector: &str,
    full: bool,
    dry_run: bool,
    since: Option<String>,
    until: Option<String>,
    limit: Option<usize>,
    progress: Option<&dyn SyncProgressReporter>,
) -> Result<()>
Expand description

Runs the full ingestion pipeline for the specified connector(s).

This is the entry point for ctx sync <connector>. It builds a ConnectorRegistry from the config and runs the pipeline.

§Arguments

  • config — application configuration.
  • connector — the connector specifier: "all", a type name ("git"), or a specific instance ("git:platform").
  • full — if true, ignores existing checkpoints and reprocesses all items.
  • dry_run — if true, scans and counts items without writing to the database.
  • since — optional YYYY-MM-DD date; only items updated on or after this date are processed.
  • until — optional YYYY-MM-DD date; only items updated on or before this date are processed.
  • limit — optional maximum number of items to process (per connector instance).
  • progress — optional progress reporter; when provided, progress is emitted on stderr.

§Errors

Returns an error if:

  • The specified connector is unknown or not configured.
  • A connector fails to scan (e.g., network error).
  • A database operation fails.