changeset 3814:4edfd7521418

core (memory/sqla_config): set a timeout for SQLite: with default timeout, we may have database lock errors from time to time. To avoid this, a timeout of 30s is now set.
author Goffi <goffi@goffi.org>
date Wed, 29 Jun 2022 10:17:33 +0200
parents 1a10b8b4f169
children 853cbaf56e9e
files sat/memory/sqla_config.py
diffstat 1 files changed, 1 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/sat/memory/sqla_config.py	Wed Jun 29 10:16:03 2022 +0200
+++ b/sat/memory/sqla_config.py	Wed Jun 29 10:17:33 2022 +0200
@@ -32,7 +32,7 @@
     main_conf = config.parseMainConf()
     local_dir = Path(config.getConfig(main_conf, "", "local_dir"))
     database_path = (local_dir / C.SAVEFILE_DATABASE).expanduser()
-    url = f"sqlite+aiosqlite:///{quote(str(database_path))}"
+    url = f"sqlite+aiosqlite:///{quote(str(database_path))}?timeout=30"
     return {
         "type": "sqlite",
         "path": database_path,