Skip to main content

write_days

Function write_days 

Source
pub async fn write_days(
    pool: &PgPool,
    user_id: Uuid,
    days: &[AgentDay],
    offset: FixedOffset,
) -> Result<usize>
Expand description

Writes the days into the server’s tables, as the given user.

Each day is its own transaction, matching the batch upload: an import of a year that fails on day 200 leaves 199 days imported, and running it again is safe because a re-imported day replaces itself.