Fixed an issue where database migrations could cause a db query timeout

pull/1061/head
Morgan Pretty 2 months ago
parent 23159439f2
commit 18f4b57811

@ -332,7 +332,11 @@ open class Storage {
}
}()
migrationCompleted(finalResult)
// Note: We need to dispatch this to the next run toop to prevent blocking if the callback
// performs subsequent database operations
DispatchQueue.global(qos: .userInitiated).async(using: dependencies) {
migrationCompleted(finalResult)
}
}
}

Loading…
Cancel
Save