Megatest

Check-in [d75d0889de]
Login
Overview
Comment:Couple corrections to client discarding of connections logic
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.60
Files: files | file ages | folders
SHA1: d75d0889de89ac17bfe86be12bca23bf3c078869
User & Date: matt on 2014-10-20 21:46:19
Other Links: branch diff | manifest | tags
Context
2014-10-20
22:21
Added compression for messages over http check-in: a73f871b7d user: matt tags: v1.60
21:46
Couple corrections to client discarding of connections logic check-in: d75d0889de user: matt tags: v1.60
18:02
Purge connections that haven't been used in 60 seconds - they might have idled out check-in: a128117bd7 user: matt tags: v1.60
Changes

Modified http-transport.scm from [4d3ec2350a] to [457c02e647].

326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
;;
;; connect
;;
(define (http-transport:client-connect iface port)
  (let* ((api-url      (conc "http://" iface ":" port "/api"))
	 (api-uri      (uri-reference (conc "http://" iface ":" port "/api")))
	 (api-req      (make-request method: 'POST uri: api-uri))
	 (server-dat   (vector iface port api-uri api-url api-req)))
    server-dat))

;; run http-transport:keep-running in a parallel thread to monitor that the db is being 
;; used and to shutdown after sometime if it is not.
;;
(define (http-transport:keep-running server-id run-id)
  ;; if none running or if > 20 seconds since 







|







326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
;;
;; connect
;;
(define (http-transport:client-connect iface port)
  (let* ((api-url      (conc "http://" iface ":" port "/api"))
	 (api-uri      (uri-reference (conc "http://" iface ":" port "/api")))
	 (api-req      (make-request method: 'POST uri: api-uri))
	 (server-dat   (vector iface port api-uri api-url api-req (current-seconds))))
    server-dat))

;; run http-transport:keep-running in a parallel thread to monitor that the db is being 
;; used and to shutdown after sometime if it is not.
;;
(define (http-transport:keep-running server-id run-id)
  ;; if none running or if > 20 seconds since 

Modified rmt.scm from [e0cf83e1e8] to [d26a3cbeff].

60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
;;
(define (rmt:send-receive cmd rid params)
  ;; clean out old connections
  (let ((expire-time (- (current-seconds) 60)))
    (for-each 
     (lambda (run-id)
       (let ((connection (hash-table-ref *runremote* run-id)))
	 (if (> (http-transport:server-dat-get-last-access connection) expire-time)
	     (begin
	       (debug:print-info 0 "Discarding connection to server for run-id " run-id ", too long between accesses")
	       (hash-table-delete! *runremote* run-id)))))
     (hash-table-keys *runremote*)))
  (let* ((run-id          (if rid rid 0))
	 (connection-info (let ((cinfo (hash-table-ref/default *runremote* run-id #f)))
			    (if cinfo







|







60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
;;
(define (rmt:send-receive cmd rid params)
  ;; clean out old connections
  (let ((expire-time (- (current-seconds) 60)))
    (for-each 
     (lambda (run-id)
       (let ((connection (hash-table-ref *runremote* run-id)))
	 (if (< (http-transport:server-dat-get-last-access connection) expire-time)
	     (begin
	       (debug:print-info 0 "Discarding connection to server for run-id " run-id ", too long between accesses")
	       (hash-table-delete! *runremote* run-id)))))
     (hash-table-keys *runremote*)))
  (let* ((run-id          (if rid rid 0))
	 (connection-info (let ((cinfo (hash-table-ref/default *runremote* run-id #f)))
			    (if cinfo

tests/installall/config/megatest.config.dat became a regular file with contents [736a5da885].

tests/installall/config/runconfigs.config.dat became a regular file with contents [3b8f260acb].