Overview
Comment: | Placeholder for rmt:send-receive switch |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | v1.65-wip |
Files: | files | file ages | folders |
SHA1: |
38212a804adc593bc4386c7445e5932b |
User & Date: | matt on 2019-09-25 23:50:15 |
Other Links: | branch diff | manifest | tags |
Context
2019-09-26
| ||
17:05 | WIP check-in: e300afb35f user: mrwellan tags: v1.65-wip | |
2019-09-25
| ||
23:50 | Placeholder for rmt:send-receive switch check-in: 38212a804a user: matt tags: v1.65-wip | |
16:38 | Merged in the first pass code clean up using modules. This passes unit and ext-tests. check-in: 0d84db9635 user: mrwellan tags: v1.65 | |
Changes
Modified rmt.scm from [5054b48a41] to [a693c2ffc7].
︙ | |||
52 53 54 55 56 57 58 59 60 | 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 | + + + + + - + - + | cinfo (if (server:check-if-running areapath) (client:setup areapath) #f)))) (define *send-receive-mutex* (make-mutex)) ;; should have separate mutex per run-id ;; this entry point can decide based on cmd whether to dispatch to old api calls via remote or via ulex ;; (define (rmt:send-receive cmd rid params #!key (attemptnum 1)(area-dat #f)) (rmt:send-receive-orig cmd rid params attemptnum: attemptnum area-dat: area-dat)) ;; RA => e.g. usage (rmt:send-receive 'get-var #f (list varname)) ;; |
︙ | |||
140 141 142 143 144 145 146 | 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 | - + | (> (current-seconds) ;; if it has been more than server-timeout seconds since last contact, close this connection and start a new on (+ (http-transport:server-dat-get-last-access (remote-conndat runremote)) (remote-server-timeout runremote)))) (debug:print-info 0 *default-log-port* "Connection to " (remote-server-url runremote) " expired due to no accesses, forcing new connection.") (http-transport:close-connections area-dat: runremote) (remote-conndat-set! runremote #f) ;; invalidate the connection, thus forcing a new connection. (mutex-unlock! *rmt-mutex*) |
︙ | |||
166 167 168 169 170 171 172 | 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 | - + | (not (member cmd api:read-only-queries)) ;; this is a write (remote-server-url runremote) ;; have a server (not (server:ping (remote-server-url runremote)))) ;; server has died. NOTE: this is not a cheap call! Need better approach. (set! *runremote* (make-remote)) (remote-force-server-set! runremote (common:force-server?)) (mutex-unlock! *rmt-mutex*) (debug:print-info 12 *default-log-port* "rmt:send-receive, case 6") |
︙ | |||
212 213 214 215 216 217 218 | 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 | - + | (and (not (cdr (remote-hh-dat runremote))) ;; not on a homehost (not (remote-conndat runremote)))) ;; and no connection (debug:print-info 12 *default-log-port* "rmt:send-receive, case 9, hh-dat: " (remote-hh-dat runremote) " conndat: " (remote-conndat runremote)) (mutex-unlock! *rmt-mutex*) (if (not (server:check-if-running *toppath*)) ;; who knows, maybe one has started up? (server:start-and-wait *toppath*)) (remote-conndat-set! runremote (rmt:get-connection-info *toppath*)) ;; calls client:setup which calls client:setup-http |
︙ |