diff options
author | Paul "LeoNerd" Evans <paul@matrix.org> | 2015-03-12 16:24:38 +0000 |
---|---|---|
committer | Paul "LeoNerd" Evans <paul@matrix.org> | 2015-03-12 16:24:51 +0000 |
commit | 128cf2daf76e5b05a4e577b60ea406fdbb6986bf (patch) | |
tree | 1eeda21c7b8af0d08a57f46a2ec2c81f4fe3f326 /synapse/http/client.py | |
parent | Option to serve metrics from their own localhost-only TCP port instead of mux... (diff) | |
download | synapse-128cf2daf76e5b05a4e577b60ea406fdbb6986bf.tar.xz |
Appease pep8
Diffstat (limited to 'synapse/http/client.py')
-rw-r--r-- | synapse/http/client.py | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/synapse/http/client.py b/synapse/http/client.py index 01737a7188..2ae1c4d3a4 100644 --- a/synapse/http/client.py +++ b/synapse/http/client.py @@ -34,11 +34,13 @@ logger = logging.getLogger(__name__) metrics = synapse.metrics.get_metrics_for(__name__) -outgoing_requests_counter = metrics.register_counter("requests", +outgoing_requests_counter = metrics.register_counter( + "requests", labels=["method"], ) -incoming_responses_counter = metrics.register_counter("responses", - labels=["method","code"], +incoming_responses_counter = metrics.register_counter( + "responses", + labels=["method", "code"], ) @@ -64,9 +66,11 @@ class SimpleHttpClient(object): def _cb(response): incoming_responses_counter.inc(method, response.code) return response + def _eb(failure): incoming_responses_counter.inc(method, "ERR") return failure + d.addCallbacks(_cb, _eb) return d |