Lower exponential delay 10x
This commit is contained in:
parent
ddc29602ee
commit
a43739dfeb
@ -68,7 +68,7 @@ bool ci_query_exec(QSqlQuery* query, const QString query_string) {
|
|||||||
|
|
||||||
QSqlError error = query->lastError();
|
QSqlError error = query->lastError();
|
||||||
if (error.text().contains("database is locked")) {
|
if (error.text().contains("database is locked")) {
|
||||||
int delay = 1000 * static_cast<int>(std::pow(2, attempt - 1));
|
int delay = 100 * static_cast<int>(std::pow(2, attempt - 1));
|
||||||
std::this_thread::sleep_for(std::chrono::milliseconds(delay));
|
std::this_thread::sleep_for(std::chrono::milliseconds(delay));
|
||||||
} else break;
|
} else break;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user