Skip to main content

import_for_migration

Function import_for_migration 

Source
pub async fn import_for_migration<'c>(
    transaction: &mut Transaction<'c, Sqlite>,
    event: NewEvent,
    state: ImportedDeliveryState,
) -> Result<ImportOutcome, ImportError>
Expand description

Imports one event and a portable legacy delivery state in the supplied transaction. The caller remains responsible for commit or rollback.

SQLite supplies database-authoritative millisecond operation time (stored in Dovecote’s microsecond representation with a zeroed final three fractional digits) for enqueued_at and available_at. Claims, claim tokens, retries, and quarantines are not importable. An active legacy claim must finish, expire, or be explicitly fenced before the caller maps that source row to Pending.