Skip to main content

migrate_holding

Function migrate_holding 

Source
pub async fn migrate_holding(
    lead: Leadership,
    db: &Database,
    change_notifications: bool,
) -> Result<Leadership, AppError>
Expand description

Migrates db (see unlimited) while holding lead, renewing it as the migration runs.

ยงErrors

AppError::Db if the migration fails (the lease given back), AppError::BadArgument if another master took the lease over meanwhile.