increment_attempts

Function increment_attempts 

Source
pub(crate) async fn increment_attempts(
    pool: &PgPool,
    id: i64,
    error: &str,
) -> Result<(), Error>
Expand description

Increments the attempt counter and records the error for a retryable failure.

The stream stays in upload_status = 'pending' so it will be picked up again on the next poll cycle. The caller is responsible for checking upload_attempts against the configured maximum and calling mark_failed when retries are exhausted.

ยงErrors

Returns sqlx::Error on query failure.