Overview
Comment: | Fixed some logic in list-runs for ods |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | v1.60 |
Files: | files | file ages | folders |
SHA1: |
b80779dbbd3094b969904acd2637da92 |
User & Date: | mrwellan on 2015-10-22 10:57:35 |
Other Links: | branch diff | manifest | tags |
Context
2015-10-27
| ||
10:27 | Added slow forced exit on servers check-in: 60523d6242 user: mrwellan tags: v1.60 | |
2015-10-22
| ||
10:57 | Fixed some logic in list-runs for ods check-in: b80779dbbd user: mrwellan tags: v1.60 | |
00:14 | more ods changes check-in: 4e771c0ba2 user: matt tags: v1.60 | |
Changes
Modified common.scm from [3de2002d2b] to [6d58f78d86].
︙ | ︙ | |||
144 145 146 147 148 149 150 151 152 153 154 155 156 157 | *db-access-allowed* (mutex-unlock! *db-access-mutex*)))) val)) ;;====================================================================== ;; U S E F U L S T U F F ;;====================================================================== (define (common:low-noise-print waitval . keys) (let* ((key (string-intersperse (map conc keys) "-" )) (lasttime (hash-table-ref/default *common:denoise* key 0)) (currtime (current-seconds))) (if (> (- currtime lasttime) waitval) (begin | > > > > > > > > > > > > > > > > > | 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 | *db-access-allowed* (mutex-unlock! *db-access-mutex*)))) val)) ;;====================================================================== ;; U S E F U L S T U F F ;;====================================================================== ;; convert things to an alist or assoc list, #f gets converted to "" ;; (define (common:to-alist dat) (cond ((list? dat) (map common:to-alist dat)) ((vector? dat) (map common:to-alist (vector->list dat))) ((pair? dat) (cons (common:to-alist (car dat)) (common:to-alist (cdr dat)))) ((hash-table? dat) (map common:to-alist (hash-table->alist dat))) (else (if dat dat "")))) (define (common:low-noise-print waitval . keys) (let* ((key (string-intersperse (map conc keys) "-" )) (lasttime (hash-table-ref/default *common:denoise* key 0)) (currtime (current-seconds))) (if (> (- currtime lasttime) waitval) (begin |
︙ | ︙ |
Modified megatest.scm from [4ab896c9f7] to [be504e6804].
︙ | ︙ | |||
938 939 940 941 942 943 944 | (let ((indx (hash-table-ref/default test-field-index fieldname #f))) (if indx (if (>= indx (vector-length datavec)) #f ;; index to high, should raise an error I suppose (vector-ref datavec indx)) #f))) | < < < < < < < < < < < < < < < | 938 939 940 941 942 943 944 945 946 947 948 949 950 951 | (let ((indx (hash-table-ref/default test-field-index fieldname #f))) (if indx (if (>= indx (vector-length datavec)) #f ;; index to high, should raise an error I suppose (vector-ref datavec indx)) #f))) ;; NOTE: list-runs and list-db-targets operate on local db!!! ;; (if (or (args:get-arg "-list-runs") (args:get-arg "-list-db-targets")) (if (launch:setup-for-run) (let* (;; (dbstruct (make-dbr:dbstruct path: *toppath* local: (args:get-arg "-local"))) (runpatt (args:get-arg "-list-runs")) |
︙ | ︙ | |||
1196 1197 1198 1199 1200 1201 1202 | "cpuload" "final_logf" "shortdir" "rundir" "uname" ) ) | | > > | | 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 | "cpuload" "final_logf" "shortdir" "rundir" "uname" ) ) (newdat (common:to-alist data)) (allrundat (if (null? newdat) '() (car (map cdr newdat)))) ;; (car (map cdr (car (map cdr newdat))))) (runs (append (list "runs" ;; sheetname metadat-fields) (map (lambda (run) ;; (print "run: " run) (let* ((runname (car run)) (rundat (cdr run)) |
︙ | ︙ | |||
1258 1259 1260 1261 1262 1263 1264 | (cons runs (map car run-pages))))) ;; (print "allrundat:") ;; (pp allrundat) ;; (print "runs:") ;; (pp runs) ;(print "sheets: ") ;; (pp sheets) | > | | | | | | | | | | < | 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 | (cons runs (map car run-pages))))) ;; (print "allrundat:") ;; (pp allrundat) ;; (print "runs:") ;; (pp runs) ;(print "sheets: ") ;; (pp sheets) (if (eq? dmode 'ods) (let* ((tempdir (conc "/tmp/" (current-user-name) "/" (random 10000) "_" (current-process-id))) (outputfile (or (args:get-arg "-o") "out.ods")) (ouf (if (string-match (regexp "^[/~]+.*") outputfile) ;; full path? outputfile (begin (debug:print 0 "WARNING: path given, " outputfile " is relative, prefixing with current directory") (conc (current-directory) "/" outputfile))))) (create-directory tempdir #t) (ods:list->ods tempdir ouf sheets)))) ;; (system (conc "rm -rf " tempdir)) (set! *didsomething* #t)))) ;; Don't think I need this. Incorporated into -list-runs instead ;; ;; (if (and (args:get-arg "-since") ;; (launch:setup-for-run)) ;; (let* ((since-time (string->number (args:get-arg "-since"))) |
︙ | ︙ |