Handle sqlite busy locking.
This commit is contained in:
parent
fb6e0868de
commit
5185567842
1 changed files with 5 additions and 1 deletions
|
@ -45,7 +45,11 @@
|
||||||
;; Returns (possibly cached) SQLite3 DB handle
|
;; Returns (possibly cached) SQLite3 DB handle
|
||||||
(define (mailman3-db)
|
(define (mailman3-db)
|
||||||
(when (not (*cached-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*))
|
(*cached-mailman3-db*))
|
||||||
|
|
||||||
;; Returns the list of mailman3 mailinglists by querying te
|
;; Returns the list of mailman3 mailinglists by querying te
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue