Changes In Branch switch-to-zmq Through [dcef80627c] Excluding Merge-Ins
This is equivalent to a diff from f72f46f62c to dcef80627c
2012-10-24
| ||
12:54 | Merged switch-to-zmq branch to trunk check-in: 5824df90dd user: matt tags: trunk | |
2012-10-23
| ||
17:04 | zmq almost working check-in: aaae486378 user: mrwellan tags: switch-to-zmq | |
02:16 | More implemented on zmq conversion check-in: dcef80627c user: matt tags: switch-to-zmq | |
00:13 | Start of conversion to zmq check-in: dc9fc1c7d4 user: matt tags: switch-to-zmq | |
2012-10-22
| ||
17:30 | Switched back to util-linux 2.21, disabled libblkid check-in: f72f46f62c user: fdk71adm tags: trunk | |
16:53 | Added dropped --enable-shared check-in: d0adee48e4 user: mrwellan tags: trunk | |
Modified db.scm from [9e27b746af] to [b6d8d17947].
︙ | |||
1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 | 1090 1091 1092 1093 1094 1095 1096 1097 1098 1099 1100 1101 1102 1103 1104 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 | + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + - - - - + - - - - - - - - + - - - - - - + - - - - - - + - - - - - - + - - - - - | qrystr) res)) ;;====================================================================== ;; QUEUE UP META, TEST STATUS AND STEPS ;;====================================================================== ;; db:updater is run in a thread to write out the cached data periodically (define (db:updater) (debug:print-info 4 "Starting cache processing") (let loop ((start-time (current-time))) (thread-sleep! 10) ;; move save time around to minimize regular collisions? (db:write-cached-data) (loop start-time))) ;; cdb:cached-access is called by the server loop to dispatch commands or queue up ;; db accesses ;; ;; params := qry-name cached? val1 val2 val3 ... (define (cdb:cached-access params) (if (< (length params) 2) "ERROR" (let ((qry-name (car params)) (cached? (cadr params)) (remparam (list-tail params 2))) (debug:print-info 12 "cdb:cached-access qry-name=" qry-name " params=" params) ;; Any special calls are dispatched here. ;; Remainder are put in the db queue (case qry-name ((login) ;; login checks that the megatest path matches (if (null? remparam) #f ;; no path - fail! (let ((calling-path (car remparam))) (if (equal? calling-path *toppath*) #t ;; path matches - pass! Should vet the caller at this time ... #f)))) ;; else fail to login ((flush) ( (else (mutex-lock! *incoming-mutex*) (set! *last-db-access* (current-seconds)) (set! *incoming-data* (cons (vector qry-name (current-milliseconds) params) *incoming-data*)) (mutex-unlock! *incoming-mutex*) ;; NOTE: if cached? is #f then this call must be run immediately ;; but first all calls in the queue are run first in the order ;; of their time stamp (if (and cached? *cache-on*) (begin (debug:print-info 12 "*cache-on* is " *cache-on* ", skipping cache write") "CACHED") (begin (db:write-cached-data) "WRITTEN"))))))) (define (cdb:client-call zmq-socket . params) (debug:print-info 11 "zmq-socket " params) (let ((zdat (with-output-to-string (lambda ()(serialize params)))) (res #f)) (send-message zmq-socket zdat) (set! res (receive-message zdat)) (debug:print-info 11 "zmq-socket " (car params) " res=" res) res)) (define (cdb:test-set-status-state test-id status state msg) (debug:print-info 4 "cdb:test-set-status-state test-id=" test-id ", status=" status ", state=" state ", msg=" msg) (mutex-lock! *incoming-mutex*) (set! *last-db-access* (current-seconds)) (if msg (set! *incoming-data* (cons (vector 'state-status-msg (current-milliseconds) (list state status msg test-id)) *incoming-data*)) (set! *incoming-data* (cons (vector 'state-status (current-milliseconds) (list state status test-id)) ;; run-id test-name item-path minutes cpuload diskfree tmpfree) *incoming-data*))) (mutex-unlock! *incoming-mutex*) (if *cache-on* (debug:print-info 6 "*cache-on* is " *cache-on* ", skipping cache write") (db:write-cached-data))) |
︙ |
Modified server.scm from [878578b9e5] to [f7a906dbfb].
1 2 3 4 5 6 7 8 9 10 | 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 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 | - + - - - + + + - - - - - - - - + - + - + - - - + - - - - - - - - - - - + + + + + - - - - - - - + - - - - - - - - - - + - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + - + - - - - - - + + + + + + + + + + - - + - - + + + + + - + - - - - - - + + + + + + + + - - - + + + + + + - - - + + + - - - + - - + - - - - - - + + - + | ;; Copyright 2006-2012, 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 testzmq/hwclient.scm from [8c368de31e] to [e984c3fbac].
1 2 3 | 1 2 3 4 5 6 7 8 9 10 11 | - + | (use zmq posix) (define s (make-socket 'req)) |
︙ |
Modified testzmq/hwserver.scm from [118f034d51] to [038a7e66e1].
1 2 3 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | - + - + | (use zmq srfi-18 posix) (define s (make-socket 'rep)) |