From 0bc672fe6c263b9894af0cd211d006054215c7a9 Mon Sep 17 00:00:00 2001 From: Paul Oliver Date: Wed, 19 Nov 2025 23:33:19 +0100 Subject: Installs SQLite busy handler --- core.j2.c | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'core.j2.c') diff --git a/core.j2.c b/core.j2.c index ec158dc..8aeff5d 100644 --- a/core.j2.c +++ b/core.j2.c @@ -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 %} -- cgit v1.2.1