39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
(define (open-db) ;; (conc *toppath* "/megatest.db") (car *configinfo*)))
(let* ((dbpath (conc *toppath* "/megatest.db")) ;; fname)
(dbexists (file-exists? dbpath))
(db (sqlite3:open-database dbpath)) ;; (never-give-up-open-db dbpath))
(handler (make-busy-timeout (if (args:get-arg "-override-timeout")
(string->number (args:get-arg "-override-timeout"))
36000)))) ;; 136000)))
(sqlite3:set-busy-handler! db handler)
(if (not dbexists)
(db:initialize db))
db))
(define (db:initialize db)
(let* ((configdat (car *configinfo*)) ;; tut tut, global warning...
|
>
|
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
|
(define (open-db) ;; (conc *toppath* "/megatest.db") (car *configinfo*)))
(let* ((dbpath (conc *toppath* "/megatest.db")) ;; fname)
(dbexists (file-exists? dbpath))
(db (sqlite3:open-database dbpath)) ;; (never-give-up-open-db dbpath))
(handler (make-busy-timeout (if (args:get-arg "-override-timeout")
(string->number (args:get-arg "-override-timeout"))
36000)))) ;; 136000)))
(debug:print 4 "INFO: dbpath=" dbpath)
(sqlite3:set-busy-handler! db handler)
(if (not dbexists)
(db:initialize db))
db))
(define (db:initialize db)
(let* ((configdat (car *configinfo*)) ;; tut tut, global warning...
|