Index: db.scm ================================================================== --- db.scm +++ db.scm @@ -983,17 +983,11 @@ test-id) (hash-table-set! *test-paths* test-id res) res)))) (define (cdb:test-set-log! zmqsocket test-id logf) - (if (string? logf)(cdb:client-call zmqsocket 'test-set-log #t test-id logf))) - -;; (define (db:test-set-log! db test-id logf) -;; (if (string? logf) -;; (sqlite3:execute db "UPDATE tests SET final_logf=? WHERE id=?;" -;; logf test-id) -;; (debug:print 0 "ERROR: db:test-set-log! called with non-string log file name " logf))) + (if (string? logf)(cdb:client-call zmqsocket 'test-set-log #f test-id logf))) ;;====================================================================== ;; Misc. test related queries ;;====================================================================== @@ -1097,16 +1091,16 @@ ;;====================================================================== ;; QUEUE UP META, TEST STATUS AND STEPS ;;====================================================================== ;; db:updater is run in a thread to write out the cached data periodically -(define (db:updater) - (debug:print-info 4 "Starting cache processing") - (let loop () - (thread-sleep! 10) ;; move save time around to minimize regular collisions? - (db:write-cached-data) - (loop))) +;; (define (db:updater) +;; (debug:print-info 4 "Starting cache processing") +;; (let loop () +;; (thread-sleep! 10) ;; move save time around to minimize regular collisions? +;; (db:write-cached-data) +;; (loop))) ;; cdb:cached-access is called by the server loop to dispatch commands or queue up ;; db accesses ;; ;; params := qry-name cached? val1 val2 val3 ... @@ -1116,10 +1110,11 @@ "ERROR" (let ((qry-name (car params)) (cached? (cadr params)) (remparam (list-tail params 2))) (debug:print-info 12 "cdb:cached-access qry-name=" qry-name " params=" params) + (if (not cached?)(db:write-cached-data)) ;; Any special calls are dispatched here. ;; Remainder are put in the db queue (case qry-name ((login) ;; login checks that the megatest path matches (if (null? remparam) Index: server.scm ================================================================== --- server.scm +++ server.scm @@ -181,11 +181,11 @@ (server:run (args:get-arg "-server"))))) (th3 (make-thread (lambda () (server:keep-running))))) (thread-start! th3) (thread-start! th2) - (thread-join! th3) + (thread-join! th2) (set! *didsomething* #t)) (debug:print 0 "ERROR: Failed to setup for megatest")))) (define (server:client-launch) (if (server:client-setup)