run_export

Function run_export 

Source
pub fn run_export(
    store: &EmbeddedAnalytics,
    directory: &str,
    window: WindowKind,
    window_start_ms: i64,
    formats: &[ExportFormat],
    quota_at: &dyn Fn(i64, i64) -> HashMap<String, QuotaFigures>,
    now_ms: i64,
) -> ExportRun
Expand description

Export one window: settle rollups, read the statement through the query API’s own aggregation, write one file per format, and upsert the run record. quota_at supplies the quota figures for the window (period bounds in epoch SECONDS). Never panics on I/O: a failed run is recorded failed with the error string.