Decrease exponential backoff further

This commit is contained in:
Simon Quigley 2025-01-26 20:26:04 -06:00
parent f98b9c04d8
commit 8b55525646

View File

@ -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 = 10 * static_cast<int>(std::pow(2, attempt - 1)); int delay = 10 * static_cast<int>(std::pow(1.5, attempt - 1));
std::this_thread::sleep_for(std::chrono::milliseconds(delay)); std::this_thread::sleep_for(std::chrono::milliseconds(delay));
} else break; } else break;
} }