Handle sqlite busy locking.

This commit is contained in:
Dominik Pantůček 2023-12-06 20:56:17 +01:00
parent fb6e0868de
commit 5185567842

View file

@ -45,7 +45,11 @@
;; Returns (possibly cached) SQLite3 DB handle
(define (mailman3-db)
(when (not (*cached-mailman3-db*))
(*cached-mailman3-db* (open-database (*mailman3-sql-path*))))
(*cached-mailman3-db*
(let ((handler (make-busy-timeout 2000)))
(let ((db (open-database (*mailman3-sql-path*))))
(set-busy-handler! db handler)
db))))
(*cached-mailman3-db*))
;; Returns the list of mailman3 mailinglists by querying te