Changeset - 5bd2d036ae74
[Not reviewed]
default
0 1 0
drewp@bigasterisk.com - 9 years ago 2016-06-11 21:15:36
drewp@bigasterisk.com
rdfdb log patch-to-client send times
Ignore-this: af10a7e205f559da6a7addd4a0ab93e6
1 file changed with 6 insertions and 2 deletions:
0 comments (0 inline, 0 general)
light9/rdfdb/patchsender.py
Show inline comments
 
@@ -103,10 +103,14 @@ def sendPatch(putUri, patch, **kw):
 
    if len(body) > 200:
 
        intro = intro + "..."
 
    log.debug("send body (rendered %.1fkB in %.1fms): %s", len(body) / 1024, jsonTime * 1000, intro)
 
    sendTime = time.time()
 
    def putDone(done):
 
        if not str(done.code).startswith('2'):
 
            raise ValueError("sendPatch request failed %s: %s" % (done.code, done.body))
 
        log.debug("sendPatch finished, response: %r" % done.body)
 
            raise ValueError("sendPatch request failed %s: %s" %
 
                             (done.code, done.body))
 
        dt = 1000 * (time.time() - sendTime)
 
        log.debug("sendPatch to %s took %sms, response: %r" %
 
                  (putUri, dt, done.body))
 
        return done
 

	
 
    return cyclone.httpclient.fetch(
0 comments (0 inline, 0 general)