@@ -1473,11 +1473,11 @@ ((run-wait) (debug:print 1 "Waiting for run " runkey ", run=" runnamepatt " to complete")) ((archive) (debug:print 1 "Archiving data for run: " runkey " " (db:get-value-by-header run header "runname")) (set! worker-thread (make-thread (lambda () - (archive:run-bup (args:get-arg "-archive") run-name tests)) + (archive:run-bup (args:get-arg "-archive") run-id run-name tests)) "archive-bup-thread")) (thread-start! worker-thread)) (else (debug:print-info 0 "action not recognised " action))) @@ -1567,11 +1567,12 @@ (if (not toplevel-with-children) (begin (debug:print-info 0 "Estimating disk space usage for " test-fulln) (debug:print-info 0 " " (common:get-disk-space-used run-dir))))) ))) - ))))) + ) + (if worker-thread (thread-join! worker-thread)))))) ;; remove the run if zero tests remain (if (eq? action 'remove-runs) (let ((remtests (mt:get-tests-for-run (db:get-value-by-header run header "id") #f '("DELETED") '("n/a") not-in: #t))) (if (null? remtests) ;; no more tests remaining (let* ((dparts (string-split lasttpath "/"))