mirror of
https://github.com/NixOS/nix.git
synced 2024-11-27 01:02:34 +00:00
Only warn about SQLite being busy once
No need to get annoying.
This commit is contained in:
parent
99ed558a93
commit
5e9c3da412
@ -47,7 +47,11 @@ static void throwSQLiteError(sqlite3 * db, const format & f)
|
||||
{
|
||||
int err = sqlite3_errcode(db);
|
||||
if (err == SQLITE_BUSY) {
|
||||
printMsg(lvlError, "warning: SQLite database is busy");
|
||||
static bool warned = false;
|
||||
if (!warned) {
|
||||
printMsg(lvlError, "warning: SQLite database is busy");
|
||||
warned = true;
|
||||
}
|
||||
/* Sleep for a while since retrying the transaction right away
|
||||
is likely to fail again. */
|
||||
#if HAVE_NANOSLEEP
|
||||
|
Loading…
Reference in New Issue
Block a user