Megatest

Diff
Login

Differences From Artifact [33d7fe0a70]:

To Artifact [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