Overview
Comment: | Nada |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk |
Files: | files | file ages | folders |
SHA1: |
1c292f6f90a1acb917c8980593b4b3a8 |
User & Date: | mrwellan on 2011-10-27 20:31:17 |
Other Links: | manifest | tags |
Context
2011-10-29
| ||
21:51 | Fixed test of eztest with logpro check-in: bc64078220 user: matt tags: trunk | |
2011-10-27
| ||
20:31 | Nada check-in: 1c292f6f90 user: mrwellan tags: trunk | |
2011-10-26
| ||
14:03 | Merged guitweaks (includes stuff from private branches check-in: bb8b14dea5 user: mrwellan tags: trunk | |
Changes
Modified dashboard.scm from [f724b05dae] to [31da9fd56a].
︙ | |||
280 281 282 283 284 285 286 | 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 | - + | ;; sort by second field (vlst-s1 (sort vlst (lambda (a b) (let ((astr (vector-ref a 1)) (bstr (vector-ref b 1))) (if (string=? astr "") #f #t))))) ;; (>= (string-length (vector-ref a 1))(string-length (vector-ref b 1)))))) (vlst-s2 (sort vlst-s1 (lambda (a b) |
︙ |
Modified task_records.scm from [44007a614c] to [634fd98234].
1 2 3 4 5 6 7 8 9 10 11 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 | - - + + + - - + + | ;;====================================================================== ;; Copyright 2006-2011, Matthew Welland. ;; ;; This program is made available under the GNU GPL version 2.0 or ;; greater. See the accompanying file COPYING for details. ;; ;; This program is distributed WITHOUT ANY WARRANTY; without even the ;; implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR ;; PURPOSE. ;;====================================================================== |
︙ |
Modified tasks.scm from [0bafc39e74] to [e24a437d48].
︙ | |||
35 36 37 38 39 40 41 42 43 44 45 46 47 48 | 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 | + | owner TEXT, state TEXT DEFAULT 'new', target TEXT DEFAULT '', name TEXT DEFAULT '', test TEXT DEFAULT '', item TEXT DEFAULT '', keylock TEXT, params TEXT, creation_time TIMESTAMP, execution_time TIMESTAMP);") (sqlite3:execute tdb "CREATE TABLE IF NOT EXISTS monitors (id INTEGER PRIMARY KEY, pid INTEGER, start_time TIMESTAMP, last_update TIMESTAMP, hostname TEXT, |
︙ | |||
82 83 84 85 86 87 88 | 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 | - - + + - + + | (set! res count)) tdb "SELECT count(id) FROM monitors WHERE last_update < (strftime('%s','now') - 300) AND username=?;" (car (user-information (current-user-id)))) res)) ;; register a task |
︙ | |||
129 130 131 132 133 134 135 | 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 | - + | state='reset' ORDER BY RANDOM() LIMIT 1);" keytxt) (sqlite3:for-each-row (lambda (id . rem) (set! res (apply vector id rem))) tdb |
︙ | |||
156 157 158 159 160 161 162 | 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 | - + | ;; (define (tasks:get-tasks tdb types states) (let ((res '())) (sqlite3:for-each-row (lambda (id . rem) (set! res (cons (apply vector id rem) res))) tdb |
︙ | |||
215 216 217 218 219 220 221 | 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 | - - + + - + + | (set! res (cons (apply vector a rem) res))) tdb "SELECT id,pid,strftime('%m/%d/%Y %H:%M',datetime(start_time,'unixepoch'),'localtime'),strftime('%m/%d/%Y %H:%M:%S',datetime(last_update,'unixepoch'),'localtime'),hostname,username FROM monitors ORDER BY last_update ASC;") (reverse res) )) (define (tasks:tasks->text tasks) |
︙ | |||
281 282 283 284 285 286 287 288 289 290 291 292 293 294 | 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 | + + | ;; NOTE: It might be good to add one more layer of checking to ensure ;; that no task gets run in parallel. (define (tasks:start-run db tdb task) (let ((flags (make-hash-table))) (hash-table-set! flags "-rerun" "NOT_STARTED") (if (not (string=? (tasks:task-get-params task) "")) (hash-table-set! flags "- (print "Starting run " task) ;; sillyness, just call the damn routine with the task vector and be done with it. FIXME SOMEDAY (runs:run-tests db (tasks:task-get-target task) (tasks:task-get-name task) (tasks:task-get-test task) (tasks:task-get-item task) |
︙ |