Skip to content

Commit 7c9db09

Browse files
committed
Auto merge of #652 - Mark-Simulacrum:better-queue, r=Mark-Simulacrum
Retry database is locked errors
2 parents 6dd5acd + 18cd1ab commit 7c9db09

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/agent/api.rs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -96,7 +96,10 @@ impl AgentApi {
9696
} else if let Some(err) = err.downcast_ref::<::reqwest::Error>() {
9797
err.is_timeout() || err.is_connect()
9898
} else {
99-
false
99+
// We retry these errors. Ideally it's something the
100+
// server would handle, but that's (unfortunately) hard
101+
// in practice.
102+
format!("{:?}", err).contains("database is locked")
100103
};
101104

102105
if retry {

0 commit comments

Comments
 (0)