Megatest

Diff
Login

Differences From Artifact [4666e559d1]:

To Artifact [ce6e1d604e]:


22
23
24
25
26
27
28

29

30
31
32
33
34
35
36
;; Tasks db
;;======================================================================

(define (tasks:open-db)
  (let* ((dbpath       (conc *toppath* "/monitor.db"))
	 (exists       (file-exists? dbpath))
	 (write-access (file-write-access? dbpath))

	 (mdb          (sqlite3:open-database dbpath)) ;; (never-give-up-open-db dbpath))

	 (handler      (make-busy-timeout 36000)))
    (if (and exists
	     (not write-access))
	(set! *db-write-access* write-access)) ;; only unset so other db's also can use this control
    (sqlite3:set-busy-handler! mdb handler)
    (sqlite3:execute mdb (conc "PRAGMA synchronous = 0;"))
    (if (not exists)







>
|
>







22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
;; Tasks db
;;======================================================================

(define (tasks:open-db)
  (let* ((dbpath       (conc *toppath* "/monitor.db"))
	 (exists       (file-exists? dbpath))
	 (write-access (file-write-access? dbpath))
	 (mdb          (if (file-write-access? *toppath*)
			   (sqlite3:open-database dbpath)
			   (sqlite3:open-database ":memory:"))) ;; (never-give-up-open-db dbpath))
	 (handler      (make-busy-timeout 36000)))
    (if (and exists
	     (not write-access))
	(set! *db-write-access* write-access)) ;; only unset so other db's also can use this control
    (sqlite3:set-busy-handler! mdb handler)
    (sqlite3:execute mdb (conc "PRAGMA synchronous = 0;"))
    (if (not exists)