Megatest

Diff
Login

Differences From Artifact [ae153a5943]:

To Artifact [2d959c8f92]:


503
504
505
506
507
508
509
510
511
512
513
514
515










516
517
518
519


520
521
522
523
524
525
526
503
504
505
506
507
508
509






510
511
512
513
514
515
516
517
518
519
520
521


522
523
524
525
526
527
528
529
530







-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+


-
-
+
+







			 param-key state-patt action-patt test-patt)))))

(define (tasks:find-task-queue-records dbstruct target run-name test-patt state-patt action-patt)
  ;; (handle-exceptions
  ;;  exn
  ;;  '()
  ;;  (sqlite3:first-row
  (let ((db  (db:get-db dbstruct))
	(res '()))
    (sqlite3:for-each-row 
     (lambda (a . b)
       (set! res (cons (cons a b) res)))
     db "SELECT id,action,owner,state,target,name,testpatt,keylock,params FROM tasks_queue 
  (let (;; (db  (db:get-db dbstruct))
  	(res '()))
    (db:with-db
     dbstruct #f #t
     (lambda (db)
       (sqlite3:for-each-row 
	(lambda (a . b)
	  (set! res (cons (cons a b) res)))
	db
	"SELECT id,action,owner,state,target,name,testpatt,keylock,params FROM tasks_queue 
           WHERE
              target = ? AND name = ? AND state LIKE ? AND action LIKE ? AND testpatt LIKE ?;"
     target run-name state-patt action-patt test-patt)
    res)) ;; )
	target run-name state-patt action-patt test-patt)
       res)))) ;; )

;; kill any runner processes (i.e. processes handling -runtests) that match target/runname
;; 
;; do a remote call to get the task queue info but do the killing as self here.
;;
(define (tasks:kill-runner target run-name testpatt)
  (let ((records    (rmt:tasks-find-task-queue-records target run-name testpatt "running" "run-tests"))