Overview
Comment: | Fixed fallout from moving mt:process-triggers to client side |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | v1.80-servload |
Files: | files | file ages | folders |
SHA1: |
94afafb2e7e01107e6004c0f9888d14f |
User & Date: | matt on 2023-04-21 02:53:05 |
Other Links: | branch diff | manifest | tags |
Context
2023-04-21
| ||
14:43 | fixed get-test-id check-in: b4f7c9bbf9 user: matt tags: v1.80-servload | |
02:53 | Fixed fallout from moving mt:process-triggers to client side check-in: 94afafb2e7 user: matt tags: v1.80-servload | |
2023-04-19
| ||
09:58 | wip, clean up check-in: 996c305353 user: matt tags: v1.80-servload | |
Changes
Modified TODO from [ff11150ce4] to [4f2c585def].
︙ | |||
75 76 77 78 79 80 81 | 75 76 77 78 79 80 81 82 83 84 85 | + + + + | ;; called a lot, maybe from rollup? db:get-all-state-status-counts-for-test ;; load to move from server to client tests:summarize-items ;; appears to be on client tests:summarize-tests ;; converting rmt:set-tests-state-status 1. db:get-test-id needs rmt equiv 2. |
Modified api.scm from [befb5033e9] to [1ab4975f7c].
︙ | |||
317 318 319 320 321 322 323 | 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 | + - + | ((test-set-top-process-pid) (apply db:test-set-top-process-pid dbstruct params)) ((set-state-status-and-roll-up-items) (apply db:set-state-status-and-roll-up-items dbstruct params)) ((set-state-status-and-roll-up-run) (apply db:set-state-status-and-roll-up-run dbstruct params)) ((top-test-set-per-pf-counts) (apply db:top-test-set-per-pf-counts dbstruct params)) ((test-set-archive-block-id) (apply db:test-set-archive-block-id dbstruct params)) ((insert-test) (db:insert-test dbstruct run-id params)) ((set-state-status-by-state-status) (apply db:set-state-status-by-state-status dbstruct params)) |
︙ |
Modified db.scm from [d4a73fb297] to [79e052fa8d].
︙ | |||
2272 2273 2274 2275 2276 2277 2278 | 2272 2273 2274 2275 2276 2277 2278 2279 2280 2281 2282 2283 2284 2285 | - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - | (sqlite3:with-transaction db (lambda () (sqlite3:execute db "DELETE FROM test_steps WHERE test_id IN (SELECT id FROM tests WHERE state='DELETED' AND event_time<?);" targtime) (sqlite3:execute db "DELETE FROM test_data WHERE test_id IN (SELECT id FROM tests WHERE state='DELETED' AND event_time<?);" targtime) (sqlite3:execute db "DELETE FROM tests WHERE state='DELETED' AND event_time<?;" targtime))))))) |
︙ |
Modified dbmod.scm from [840556f4fb] to [e4788821d9].
︙ | |||
763 764 765 766 767 768 769 770 771 | 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 | + + + + + + + + + + + + + + + + + + + + + | (begin (debug:print-info 0 *default-log-port* "Found old test in LAUNCHED state, test-id=" test-id " 1 day since event_time marked") (set! oldlaunched (cons (list test-id run-dir uname testname item-path run-id) oldlaunched))))) stmth3 run-id)))) (list incompleted oldlaunched toplevels))) (define (db:set-state-status-by-state-status dbstruct run-id testname currstate currstatus newstate newstatus) ;; clear caches needed (let* ((qry (conc "UPDATE tests SET state=?,status=? WHERE " (if currstate (conc "state='" currstate "' AND ") "") (if currstatus (conc "status='" currstatus "' AND ") "") " run_id=? AND testname LIKE ?;"))) (db:with-db dbstruct run-id #t (lambda (dbdat db) (sqlite3:execute db qry (or newstate currstate "NOT_STARTED") (or newstatus currstate "UNKNOWN") run-id testname))))) ) |
Modified mt.scm from [ef003bd249] to [321551147d].
︙ | |||
314 315 316 317 318 319 320 | 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 | - + | test-name)) (item-path (db:test-get-item-path testdat)) (tl-test-id (rmt:get-test-id run-id test-name "")) (tl-testdat (rmt:get-test-info-by-id run-id test-id)) (new-state-eh #f) (new-status-eh #f)) (if (member state '("LAUNCHED" "REMOTEHOSTSTART")) |
︙ |
Modified rmt.scm from [6a84bd6518] to [0132f572ea].
︙ | |||
774 775 776 777 778 779 780 | 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 | + + + + + + + + + + + + + + + + + + + + + + + + | (define (rmt:find-and-mark-incomplete run-id ovr-deadtime) (let* ((cfg-deadtime (configf:lookup-number *configdat* "setup" "deadtime")) (test-stats-update-period (configf:lookup-number *configdat* "setup" "test-stats-update-period"))) (rmt:find-and-mark-incomplete-engine run-id ovr-deadtime cfg-deadtime test-stats-update-period) ;;call end of eud of run detection for posthook (launch:end-of-run-check run-id))) ;; set tests with state currstate and status currstatus to newstate and newstatus ;; use currstate = #f and or currstatus = #f to apply to any state or status respectively ;; WARNING: SQL injection risk. NB// See new but not yet used "faster" version below ;; ;; AND NOT (item_path='' AND testname in (SELECT DISTINCT testname FROM tests WHERE testname=? AND item_path != ''));"))) ;; (debug:print 0 *default-log-port* "QRY: " qry) ;; (db:delay-if-busy) ;; ;; NB// This call only operates on toplevel tests. Consider replacing it with more general call ;; (define (rmt:set-tests-state-status run-id testnames currstate currstatus newstate newstatus) (let ((test-ids '())) (for-each (lambda (testname) (let ((test-id (db:get-test-id dbstruct run-id testname ""))) (rmt:set-state-status-by-state-status run-id testname currstate currstatus newstate newstatus) (if test-id (begin (set! test-ids (cons test-id test-ids)) (mt:process-triggers run-id test-id newstate newstatus))))) testnames) test-ids)) |
Modified rmtmod.scm from [ac1e77f103] to [0f731a3019].
︙ | |||
149 150 151 152 153 154 155 | 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 | - - - + + + | ;; (open-test-db test-path))) ;; WARNING: This currently bypasses the transaction wrapped writes system (define (rmt:test-set-state-status-by-id run-id test-id newstate newstatus newcomment) (assert (number? run-id) "FATAL: Run id required.") (rmtmod:send-receive 'test-set-state-status-by-id run-id (list run-id test-id newstate newstatus newcomment))) |
︙ | |||
194 195 196 197 198 199 200 201 202 203 | 194 195 196 197 198 199 200 201 202 203 204 205 206 207 | + + + + | (begin (debug:print 2 *default-log-port* "ERROR: cannot read " infile) (debug:print 2 *default-log-port* "ERROR: run-dir is " run-dir) #f ) (with-input-from-file infile read-lines) ))) (define (rmt:set-state-status-by-state-status run-id testname currstate currstatus newstate newstatus) (rmtmod:send-receive 'set-state-status-by-state-status run-id (list run-id testname currstate currstatus newstate newstatus))) ) |