Exemplo n.º 1
0
 def get_multi(self, keys, key_prefix=''):
     recording.pre_call_hook('MEMCACHE.get', key_prefix, keys, None)
     res = old_get_multi(self, keys, key_prefix)
     recording.post_call_hook('MEMCACHE.get', key_prefix, keys, res)
     return res
Exemplo n.º 2
0
 def _wait_postprocessor(self, start_time, data):
     recording.post_call_hook('POST', str(self.config.postprocessor), None, data)
     old_wait_postprocessor(self, start_time, data)
Exemplo n.º 3
0
 def _prepare_finish_with_xsl(self):
     recording.pre_call_hook('XSL.transform', self.transform_filename, self.doc, None)
     result = old_prepare_xsl(self)
     recording.post_call_hook('XSL.transform', self.transform_filename, self.doc, result)
     return result
Exemplo n.º 4
0
 def set_multi(self, mapping, time=0, key_prefix='', min_compress_len=0):
     recording.pre_call_hook('MEMCACHE.set', key_prefix, mapping, None)
     res = old_set_multi(self, mapping, time, key_prefix, min_compress_len)
     recording.post_call_hook('MEMCACHE.set', key_prefix, mapping, res)
     return res
Exemplo n.º 5
0
 def wrapper(request, callback, response, *args):
     recording.post_call_hook('HTTP.'+ method, url, _request_info(request), _response_info(response))
     callback(response)
Exemplo n.º 6
0
 def wrapper(request, callback, response, *args):
     recording.post_call_hook('HTTP', method, url, None)
     callback(response)
Exemplo n.º 7
0
 def fetch(self, request, *args, **kwargs):
     method, url = _request_info(request)
     recording.pre_call_hook('HTTP', method, url, None)
     response = super(HTTPClient, self).fetch(request, *args, **kwargs)
     recording.post_call_hook('HTTP', method, url, None)
     return response
Exemplo n.º 8
0
 def wrapper(request, callback, response, *args):
     recording.post_call_hook('HTTP', method, url, None)
     callback(response)
Exemplo n.º 9
0
 def fetch(self, request, *args, **kwargs):
     method, url = _request_info(request)
     recording.pre_call_hook('HTTP', method, url, None)
     response = super(HTTPClient, self).fetch(request, *args, **kwargs)
     recording.post_call_hook('HTTP', method, url, None)
     return response