Overview
Comment: | Fixed db access for dashboard |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | inmem-per-run-db-per-run-server |
Files: | files | file ages | folders |
SHA1: |
ba97cc54c610792d6b69b0570d40ac15 |
User & Date: | matt on 2014-01-30 19:52:45 |
Other Links: | branch diff | manifest | tags |
Context
2014-01-30
| ||
21:13 | Temporary mechanism for sensing new runs data for dashboard check-in: cc7330c57e user: matt tags: inmem-per-run-db-per-run-server | |
19:52 | Fixed db access for dashboard check-in: ba97cc54c6 user: matt tags: inmem-per-run-db-per-run-server | |
00:52 | Experimental fix for starting up servers on communication failure check-in: d2a221e401 user: matt tags: inmem-per-run-db-per-run-server | |
Changes
Modified db.scm from [7757e7a20d] to [42d3ed003f].
︙ | |||
107 108 109 110 111 112 113 | 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 | + + + - + - - + | ;; (define (db:get-path dbstruct id) ;; (let ((fdb (db:get-filedb dbstruct))) ;; (filedb:get-path db id))) ;; This routine creates the db. It is only called if the db is not already opened ;; (define (db:open-rundb dbstruct run-id) ;; (conc *toppath* "/megatest.db") (car *configinfo*))) (let* ((local (dbr:dbstruct-get-local dbstruct)) (rdb (if local (dbr:dbstruct-get-localdb dbstruct run-id) |
︙ | |||
134 135 136 137 138 139 140 | 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 | - + | )) ;; add strings db to rundb, not in use yet (sqlite3:set-busy-handler! db handler) (sqlite3:execute db "PRAGMA synchronous = 1;"))) ;; was 0 but 0 is a gamble (dbr:dbstruct-set-rundb! dbstruct db) (dbr:dbstruct-set-inuse! dbstruct #t) (if local (begin |
︙ | |||
236 237 238 239 240 241 242 | 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 | + - + + + + + + + - + | 0))) ;; close all opened run-id dbs (define (db:close-all dbstruct) ;; finalize main.db (db:sync-touched dbstruct force-sync: #t) (sqlite3:finalize! (db:get-db dbstruct #f)) (let* ((local (dbr:dbstruct-get-local dbstruct)) |
︙ |
Modified db_records.scm from [f1cf9cf368] to [ee094931e6].
︙ | |||
22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | + + - + + + + + + + + | (define-inline (dbr:dbstruct-get-rundb vec) (vector-ref vec 4)) (define-inline (dbr:dbstruct-get-inmem vec) (vector-ref vec 5)) (define-inline (dbr:dbstruct-get-mtime vec) (vector-ref vec 6)) (define-inline (dbr:dbstruct-get-rtime vec) (vector-ref vec 7)) (define-inline (dbr:dbstruct-get-stime vec) (vector-ref vec 8)) (define-inline (dbr:dbstruct-get-inuse vec) (vector-ref vec 9)) (define-inline (dbr:dbstruct-get-refdb vec) (vector-ref vec 10)) (define-inline (dbr:dbstruct-get-locdbs vec) (vector-ref vec 11)) (define-inline (dbr:dbstruct-set-main! vec val)(vector-set! vec 0 val)) (define-inline (dbr:dbstruct-set-strdb! vec val)(vector-set! vec 1 val)) (define-inline (dbr:dbstruct-set-path! vec val)(vector-set! vec 2 val)) (define-inline (dbr:dbstruct-set-local! vec val)(vector-set! vec 3 val)) (define-inline (dbr:dbstruct-set-rundb! vec val)(vector-set! vec 4 val)) (define-inline (dbr:dbstruct-set-inmem! vec val)(vector-set! vec 5 val)) (define-inline (dbr:dbstruct-set-mtime! vec val)(vector-set! vec 6 val)) (define-inline (dbr:dbstruct-set-rtime! vec val)(vector-set! vec 7 val)) (define-inline (dbr:dbstruct-set-stime! vec val)(vector-set! vec 8 val)) (define-inline (dbr:dbstruct-set-inuse! vec val)(vector-set! vec 9 val)) (define-inline (dbr:dbstruct-set-refdb! vec val)(vector-set! vec 10 val)) (define-inline (dbr:dbstruct-set-locdbs! vec val)(vector-set! vec 11 val)) ;; constructor for dbstruct ;; (define (make-dbr:dbstruct #!key (path #f)(local #f)) |
︙ |
Modified http-transport.scm from [ea6604d38f] to [cb9f17b39f].
︙ | |||
303 304 305 306 307 308 309 | 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 | - + + - + | (exit 1)))) (res #f)) (handle-exceptions exn (begin ;; TODO: Send this output to a log file so it isn't lost when running as daemon (print "ERROR IN http-transport:client-send-receive " ((condition-property-accessor 'exn 'message) exn)) |
︙ |