Overview
Comment: | Some tweaks to accomodate long running server (lives for 48 hrs after last access) |
---|---|
Downloads: | Tarball | ZIP archive | SQL archive |
Timelines: | family | ancestors | descendants | both | trunk | v1.5102 |
Files: | files | file ages | folders |
SHA1: |
c9858f0dcbe977d02e8105cd87080970 |
User & Date: | mrwellan on 2012-11-01 14:08:00 |
Other Links: | manifest | tags |
Context
2012-11-02
| ||
00:28 | Added check for version on client/server login. Converted to looking at heartbeat time instead of trying to connect to server check-in: af929ed4d8 user: matt tags: trunk, 1.5103 | |
2012-11-01
| ||
14:08 | Some tweaks to accomodate long running server (lives for 48 hrs after last access) check-in: c9858f0dcb user: mrwellan tags: trunk, v1.5102 | |
11:21 | bumped version to 1.5101 check-in: 6b3cce4bcf user: mrwellan tags: trunk, v1.5101 | |
Changes
Modified megatest.scm from [100a519d71] to [140e7d9667].
︙ | |||
287 288 289 290 291 292 293 | 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 | - + - - + + + + - + - + | (pid (vector-ref server 1)) (hostname (vector-ref server 2)) (port (vector-ref server 3)) (start-time (vector-ref server 4)) (priority (vector-ref server 5)) (state (vector-ref server 6)) (stat-numc (server:ping hostname port)) |
︙ |
Modified server.scm from [932059ea25] to [06d840e03e].
︙ | |||
43 44 45 46 47 48 49 | 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 | - + | (if ipstr ipstr hostname)))) (set! zmq-socket (server:find-free-port-and-open ipaddrstr zmq-socket 5555 0)) (set! *cache-on* #t) ;; what to do when we quit ;; (on-exit (lambda () |
︙ | |||
68 69 70 71 72 73 74 75 | 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 | + - - + - - + + - - + + - - + + - + | (debug:print-info 12 "server=> received params=" params) (set! res (cdb:cached-access params)) (debug:print-info 12 "server=> processed res=" res) (send-message zmq-socket (db:obj->string res)) (if (not *time-to-exit*) (loop) (begin (open-run-close tasks:server-deregister-self tasks:open-db #f) (db:write-cached-data) |
︙ | |||
195 196 197 198 199 200 201 | 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 | - - + + + | (debug:print-info 2 "Failed to login or connect to " conurl) (set! *runremote* #f) #f)))))) (if (> numtries 0) (let ((exe (car (argv)))) (debug:print-info 1 "No server available, attempting to start one...") (process-run exe (list "-server" "-" "-debug" (conc *verbosity*))) |
︙ |
Modified tasks.scm from [29f8996e48] to [6027d829c1].
︙ | |||
76 77 78 79 80 81 82 83 84 85 | 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 | + - + - - + + | ;; state: 'live, 'shutting-down, 'dead (define (tasks:server-register mdb pid hostname port priority state) (sqlite3:execute mdb "INSERT OR REPLACE INTO servers (pid,hostname,port,start_time,priority,state) VALUES(?,?,?,strftime('%s','now'),?,?);" pid hostname port priority (conc state))) ;; NB// two servers with same pid on different hosts will be removed from the list if pid: is used! (define (tasks:server-deregister mdb hostname #!key (port #f)(pid #f)) (debug:print-info 11 "server-deregister " hostname ", port " port ", pid " pid) (if pid |
︙ |