diff options
| author | Paul Oliver <contact@pauloliver.dev> | 2025-11-19 23:33:19 +0100 |
|---|---|---|
| committer | Paul Oliver <contact@pauloliver.dev> | 2025-11-21 21:20:20 +0100 |
| commit | 0bc672fe6c263b9894af0cd211d006054215c7a9 (patch) | |
| tree | 0b1a15214ddbb19e56a5f861fc65b34b9b32bd51 /core.j2.c | |
| parent | d2fb55d117f639246548d19c48ff7e9eabc15a8d (diff) | |
Installs SQLite busy handler
Diffstat (limited to 'core.j2.c')
| -rw-r--r-- | core.j2.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -602,6 +602,9 @@ void salis_init() { sqlite3_open("{{ data_push_path }}", &g_sim_data); assert(g_sim_data); + // Install busy handler to retry transactions if DB is locked + sqlite3_busy_timeout(g_sim_data, {{ data_push_busy_timeout }}); + arch_push_data_header(); arch_push_data_line(); {% endif %} @@ -673,6 +676,9 @@ void salis_load() { {% if data_push_path is defined %} sqlite3_open("{{ data_push_path }}", &g_sim_data); assert(g_sim_data); + + // Install busy handler to retry transactions if DB is locked + sqlite3_busy_timeout(g_sim_data, {{ data_push_busy_timeout }}); {% endif %} } {% endif %} |
