Megatest

Check-in [4b9956034c]
Login
Overview
Comment:added sqlite3 switch back
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.63-configdbsync
Files: files | file ages | folders
SHA1: 4b9956034c3763798b1bc83004853d940bc0e722
User & Date: srehman on 2017-01-09 17:17:30
Other Links: branch diff | manifest | tags
Context
2017-01-10
11:50
preparing for merge check-in: f1e2f0433e user: srehman tags: v1.63-configdbsync
2017-01-09
17:17
added sqlite3 switch back check-in: 4b9956034c user: srehman tags: v1.63-configdbsync
12:04
updated to latest v1.63, WIP check-in: 8e63364af0 user: srehman tags: v1.63-configdbsync
Changes

Modified db.scm from [33d7fe0a70] to [2c21b2df15].

292
293
294
295
296
297
298









299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
                      (res '())
                      (cfgdb #f))
                      (for-each (lambda (dbitem)
                            (let* ((stringsplit (string-split (cadr dbitem)))
                                  (dbtype (string->symbol (car stringsplit)))
                                  (dbinfo '())
                                  (cred '()))









                              (for-each 
                                (lambda (x)
                                  (if (not (eqv? (string->symbol x) dbtype))
                                  (let* ((pair (string-split x ":")))
                                    (if (not (eqv? pair '()))
                                      (set! dbinfo (cons (cons (string->symbol (car pair)) (cadr pair)) dbinfo))))))
                              stringsplit)
                              (set! cfgdb (dbi:open dbtype dbinfo))
                              (set! res (cons (cons cfgdb (alist-ref 'host dbinfo)) res))
                              ))
                      dblist)
                      (print res)
                      (dbr:dbstruct-slave-dbs-set! dbstruct res)
                      )))

          ;;	    (mutex-unlock! *rundb-mutex*)
          (if (and (not dbfexists)
                   write-access) ;; *db-write-access*) ;; did not have a prior db and do have write access
	      (begin







>
>
>
>
>
>
>
>
>
|








|

<







292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318

319
320
321
322
323
324
325
                      (res '())
                      (cfgdb #f))
                      (for-each (lambda (dbitem)
                            (let* ((stringsplit (string-split (cadr dbitem)))
                                  (dbtype (string->symbol (car stringsplit)))
                                  (dbinfo '())
                                  (cred '()))
                            
                            (if (eqv? 'sqlite3 dbtype)
                              ((set! dbinfo (cadr stringsplit))
                              (set! cfgdb (dbi:open 'sqlite3 (cons (cons 'dbname dbinfo) '()) ))
                              (db:initialize-main-db cfgdb)
                              (db:initialize-run-id-db cfgdb)
                              (set! res (cons (cons cfgdb dbinfo) res))))

                            (if (eqv? 'pg dbtype)
                              ((for-each 
                                (lambda (x)
                                  (if (not (eqv? (string->symbol x) dbtype))
                                  (let* ((pair (string-split x ":")))
                                    (if (not (eqv? pair '()))
                                      (set! dbinfo (cons (cons (string->symbol (car pair)) (cadr pair)) dbinfo))))))
                              stringsplit)
                              (set! cfgdb (dbi:open dbtype dbinfo))
                              (set! res (cons (cons cfgdb (alist-ref 'host dbinfo)) res))
                              ))))
                      dblist)

                      (dbr:dbstruct-slave-dbs-set! dbstruct res)
                      )))

          ;;	    (mutex-unlock! *rundb-mutex*)
          (if (and (not dbfexists)
                   write-access) ;; *db-write-access*) ;; did not have a prior db and do have write access
	      (begin