23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
(import (prefix sqlite3 sqlite3:))
(declare (unit portlogger))
(declare (uses db))
(declare (uses commonmod))
(import commonmod)
;; lsof -i
(define (portlogger:open-db fname)
(let* ((avail (tasks:wait-on-journal fname 5 remove: #t)) ;; wait up to about 10 seconds for the journal to go away
(exists (common:file-exists? fname))
(db (if avail
|
>
>
>
|
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
|
(import (prefix sqlite3 sqlite3:))
(declare (unit portlogger))
(declare (uses db))
(declare (uses commonmod))
(import commonmod)
(declare (uses dbmod))
(import dbmod)
;; lsof -i
(define (portlogger:open-db fname)
(let* ((avail (tasks:wait-on-journal fname 5 remove: #t)) ;; wait up to about 10 seconds for the journal to go away
(exists (common:file-exists? fname))
(db (if avail
|