Merge pull request 'fix(reembed): set a busy timeout so it can run beside the live server' (#221) from fix/reembed-busy-timeout into master
Reviewed-on: #221
This commit was merged in pull request #221.
This commit is contained in:
commit
6fffca9989
1 file changed
+7
@@ -286,6 +286,13 @@ async fn main() -> Result<()> {
|
|||||||
|
|
||||||
let mut conn = SqliteConnection::establish(&database_url)
|
let mut conn = SqliteConnection::establish(&database_url)
|
||||||
.with_context(|| format!("connecting to {}", database_url))?;
|
.with_context(|| format!("connecting to {}", database_url))?;
|
||||||
|
// Run beside the live server: its watcher writes the same file, and
|
||||||
|
// without a busy timeout one contended UPDATE fails the whole run.
|
||||||
|
{
|
||||||
|
use diesel::connection::SimpleConnection;
|
||||||
|
conn.batch_execute("PRAGMA busy_timeout = 15000;")
|
||||||
|
.context("setting busy_timeout")?;
|
||||||
|
}
|
||||||
|
|
||||||
// This tool exists to move the corpus to the configured contract, so it
|
// This tool exists to move the corpus to the configured contract, so it
|
||||||
// embeds even while the stored one differs (#189).
|
// embeds even while the stored one differs (#189).
|
||||||
|
|||||||
Reference in new issue
Block a user