mirror of
https://github.com/Start9Labs/start-os.git
synced 2026-03-26 02:11:53 +00:00
retry pgloader up to 5x (#1845)
This commit is contained in:
@@ -100,7 +100,14 @@ impl RpcContextConfig {
|
||||
.with_kind(crate::ErrorKind::Database)?;
|
||||
let old_db_path = self.datadir().join("main/secrets.db");
|
||||
if tokio::fs::metadata(&old_db_path).await.is_ok() {
|
||||
pgloader(&old_db_path).await?;
|
||||
let mut res = Ok(());
|
||||
for _ in 0..5 {
|
||||
res = pgloader(&old_db_path).await;
|
||||
if res.is_ok() {
|
||||
break;
|
||||
}
|
||||
}
|
||||
res?
|
||||
}
|
||||
Ok(secret_store)
|
||||
}
|
||||
|
||||
@@ -141,7 +141,14 @@ impl SetupContext {
|
||||
.with_kind(crate::ErrorKind::Database)?;
|
||||
let old_db_path = self.datadir.join("main/secrets.db");
|
||||
if tokio::fs::metadata(&old_db_path).await.is_ok() {
|
||||
pgloader(&old_db_path).await?;
|
||||
let mut res = Ok(());
|
||||
for _ in 0..5 {
|
||||
res = pgloader(&old_db_path).await;
|
||||
if res.is_ok() {
|
||||
break;
|
||||
}
|
||||
}
|
||||
res?
|
||||
}
|
||||
Ok(secret_store)
|
||||
}
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
"name": null,
|
||||
"auto-check-updates": true,
|
||||
"pkg-order": [],
|
||||
"ack-welcome": "0.3.0",
|
||||
"ack-welcome": "0.3.2",
|
||||
"marketplace": {
|
||||
"selected-id": null,
|
||||
"known-hosts": {}
|
||||
|
||||
Reference in New Issue
Block a user