Overview
Comment: | Added serialize-env back in Makefile. Stabilize ids on init of keys and MEGATEST_VERSION on db creation |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | v1.80-servload |
Files: | files | file ages | folders |
SHA1: |
ab0494b4b681fb8fe2729874147a548b |
User & Date: | matt on 2023-05-05 19:23:13 |
Other Links: | branch diff | manifest | tags |
Context
2023-05-05
| ||
19:23 | Added serialize-env back in Makefile. Stabilize ids on init of keys and MEGATEST_VERSION on db creation Closed-Leaf check-in: ab0494b4b6 user: matt tags: v1.80-servload | |
06:46 | wip check-in: 411180a81e user: matt tags: v1.80-servload | |
Changes
Modified Makefile from [1094c8727d] to [285514dfca].
︙ | |||
386 387 388 389 390 391 392 | 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 | - + | $(PREFIX)/bin/mt-old-to-new.sh $(PREFIX)/bin/mt-new-to-old.sh \ $(PREFIX)/share/docs/megatest_manual.html $(PREFIX)/bin/remrun \ $(PREFIX)/share/docs/megatest_manual.html $(PREFIX)/bin/remrun $(PREFIX)/bin/mtutil \ $(PREFIX)/share/db/mt-pg.sql \ $(PREFIX)/share/js/jquery-3.1.0.slim.min.js \ $(PREFIX)/bin/.$(ARCHSTR)/lib/libpangox-1.0.so \ $(PREFIX)/bin/.$(ARCHSTR)/lib/libpangox-1.0.so.0 \ |
︙ |
Modified db.scm from [79e052fa8d] to [4bec156314].
︙ | |||
709 710 711 712 713 714 715 | 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 | - - - + + + + + + + + + + + + + | (lambda () ;; handle-exceptions ;; exn ;; (begin ;; (debug:print 0 "ERROR: Failed to create tables. Look at your [fields] section, should be: fieldname TEXT DEFAULT 'yourdefault'") ;; (exit)) (sqlite3:execute db "CREATE TABLE IF NOT EXISTS keys (id INTEGER PRIMARY KEY, fieldname TEXT, fieldtype TEXT, CONSTRAINT keyconstraint UNIQUE (fieldname));") |
︙ | |||
806 807 808 809 810 811 812 | 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 | + + + + + + + + + + - + | ;; (sqlite3:execute db "CREATE VIEW runs_tests AS SELECT * FROM runs INNER JOIN tests ON runs.id=tests.run_id;") (sqlite3:execute db "CREATE TABLE IF NOT EXISTS extradat (id INTEGER PRIMARY KEY, run_id INTEGER, key TEXT, val TEXT);") (sqlite3:execute db "CREATE TABLE IF NOT EXISTS metadat (id INTEGER PRIMARY KEY, var TEXT, val TEXT, CONSTRAINT metadat_constraint UNIQUE (var));") (sqlite3:execute db "CREATE TABLE IF NOT EXISTS access_log (id INTEGER PRIMARY KEY, user TEXT, accessed TIMESTAMP, args TEXT);") ;; Must do this *after* running patch db !! No more. ;; cannot use db:set-var since it will deadlock, hardwire the code here (let* ((prev-version #f) (curr-version (common:version-signature))) (sqlite3:for-each-row (lambda (ver) (set! prev-version ver)) db "SELECT val FROM metadat WHERE var='MEGATEST_VERSION';") (if prev-version (if (not (equal? prev-version curr-version)) (sqlite3:execute db "UPDATE metadat SET val=? WHERE var=?;" curr-version "MEGATEST_VERSION")) |
︙ |
Modified dbmod.scm from [f508970062] to [20ac266100].
︙ | |||
101 102 103 104 105 106 107 | 101 102 103 104 105 106 107 108 109 110 111 112 113 114 | - | (curr-secs (current-seconds))) (if (> (- curr-secs last-update) 3) (begin (sync-proc last-update) ;; MOVE THIS CALL TO INSIDE THE sync-proc CALL (dbr:dbstruct-last-update-set! dbstruct curr-secs) |
︙ | |||
293 294 295 296 297 298 299 300 301 302 303 304 305 306 | 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 | + | ;; if last-update specified ("field-name" . time-in-seconds) ;; then sync only records where field-name >= time-in-seconds ;; IFF field-name exists ;; ;; Use (db:sync-all-tables-list keys) to get the tbls input ;; (define (dbmod:sync-tables tbls last-update keys fromdb todb) (debug:print-info 0 *default-log-port* "dbmod:sync-tables called, from: "fromdb", to: "todb) (assert (sqlite3:database? fromdb) "FATAL: dbmod:sync-tables called with fromdb not a database" fromdb) (assert (sqlite3:database? todb) "FATAL: dbmod:sync-tables called with fromdb not a database" todb) (let ((specials `(("keys" "fieldname") ("metadat" "var") ,(cons "runs" (cons "runname" keys)) ("tests" "run_id" "testname" "item_path") ("test_meta" "testname") |
︙ | |||
428 429 430 431 432 433 434 | 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 | - + | (begin ;; (clean-up-qry from-id) (qry-proc)) (qry-proc)) (set! num-updates (+ num-updates 1)))))) fields-sans-lu) (let ((row (get-row from-db from-id))) ;; need to insert the row |
︙ |