Megatest

Check-in [aeed6c5c75]
Login
Overview
Comment:Added message on read-only query bypassing server
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | v1.60
Files: files | file ages | folders
SHA1: aeed6c5c7533f9168c03839aea8656f1097b6318
User & Date: matt on 2014-08-26 00:02:14
Other Links: branch diff | manifest | tags
Context
2014-08-26
10:08
Cleaned up messages on server startup. Servers started only if write frequency is high. check-in: b045e9649e user: mrwellan tags: v1.60
00:02
Added message on read-only query bypassing server check-in: aeed6c5c75 user: matt tags: v1.60
2014-08-25
23:27
Read-only calls can bypass the server if it isn't already running. check-in: 9509385707 user: matt tags: v1.60
Changes

Modified rmt.scm from [a10d02527a] to [d60558790e].

65
66
67
68
69
70
71


72
73
74
75
76
77
78
79
    (if connection-info
	(let ((res             (http-transport:client-api-send-receive run-id connection-info cmd jparams)))
	  (if res
	      (db:string->obj res)
	      (let ((new-connection-info (client:setup run-id)))
		(debug:print 0 "WARNING: Communication failed, trying call to http-transport:client-api-send-receive again.")
		(rmt:send-receive cmd run-id params))))


	(rmt:open-qry-close-locally cmd run-id params))))

(define (rmt:open-qry-close-locally cmd run-id params)
  (let* ((dbdir (conc    (configf:lookup *configdat* "setup" "linktree") "/.db"))
	 (dbstruct-local (make-dbr:dbstruct path:  dbdir
					    local: #t))
	 (db-file-path   (db:dbfile-path 0))
	 ;; (read-only      (not (file-read-access? db-file-path)))







>
>
|







65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
    (if connection-info
	(let ((res             (http-transport:client-api-send-receive run-id connection-info cmd jparams)))
	  (if res
	      (db:string->obj res)
	      (let ((new-connection-info (client:setup run-id)))
		(debug:print 0 "WARNING: Communication failed, trying call to http-transport:client-api-send-receive again.")
		(rmt:send-receive cmd run-id params))))
	(begin
	  (debug:print-info 0 "no server and read-only query, bypassing normal channel")
	  (rmt:open-qry-close-locally cmd run-id params)))))

(define (rmt:open-qry-close-locally cmd run-id params)
  (let* ((dbdir (conc    (configf:lookup *configdat* "setup" "linktree") "/.db"))
	 (dbstruct-local (make-dbr:dbstruct path:  dbdir
					    local: #t))
	 (db-file-path   (db:dbfile-path 0))
	 ;; (read-only      (not (file-read-access? db-file-path)))