Introduce a delay before retrying a transaction after a serialization failure
Co-authored-by: Antonio Scandurra <antonio@zed.dev>
This commit is contained in:
parent
1fbdea6a03
commit
35280f7d80
4 changed files with 74 additions and 66 deletions
|
@ -32,7 +32,7 @@ async fn main() -> Result<()> {
|
|||
let config = envy::from_env::<MigrateConfig>().expect("error loading config");
|
||||
let mut db_options = db::ConnectOptions::new(config.database_url.clone());
|
||||
db_options.max_connections(5);
|
||||
let db = Database::new(db_options).await?;
|
||||
let db = Database::new(db_options, Executor::Production).await?;
|
||||
|
||||
let migrations_path = config
|
||||
.migrations_path
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue