summary refs log tree commit diff
path: root/synapse/handlers
diff options
context:
space:
mode:
authorAmber Brown <hawkowl@atleastfornow.net>2018-05-22 17:32:57 -0500
committerAmber Brown <hawkowl@atleastfornow.net>2018-05-22 17:32:57 -0500
commit53cc2cde1f609ec34a4ce6a7c678302c65ddfe53 (patch)
tree10aef6af981f9dceed0d6c3fde9b339623b03879 /synapse/handlers
parentcleanup pep8 errors (diff)
downloadsynapse-53cc2cde1f609ec34a4ce6a7c678302c65ddfe53.tar.xz
cleanup
Diffstat (limited to 'synapse/handlers')
-rw-r--r--synapse/handlers/appservice.py9
-rw-r--r--synapse/handlers/presence.py12
2 files changed, 14 insertions, 7 deletions
diff --git a/synapse/handlers/appservice.py b/synapse/handlers/appservice.py
index a7345331af..d9f35a5dba 100644
--- a/synapse/handlers/appservice.py
+++ b/synapse/handlers/appservice.py
@@ -127,12 +127,15 @@ class ApplicationServicesHandler(object):
                     now = self.clock.time_msec()
                     ts = yield self.store.get_received_ts(events[-1].event_id)
 
-                    synapse.metrics.event_processing_positions.labels("appservice_sender").set(upper_bound)
+                    synapse.metrics.event_processing_positions.labels(
+                        "appservice_sender").set(upper_bound)
 
                     events_processed_counter.inc(len(events))
 
-                    synapse.metrics.event_processing_lag.labels("appservice_sender").set(now - ts)
-                    synapse.metrics.event_processing_last_ts.labels("appservice_sender").set(ts)
+                    synapse.metrics.event_processing_lag.labels(
+                        "appservice_sender").set(now - ts)
+                    synapse.metrics.event_processing_last_ts.labels(
+                        "appservice_sender").set(ts)
             finally:
                 self.is_processing = False
 
diff --git a/synapse/handlers/presence.py b/synapse/handlers/presence.py
index 4ee87d5714..12939aa507 100644
--- a/synapse/handlers/presence.py
+++ b/synapse/handlers/presence.py
@@ -47,7 +47,8 @@ logger = logging.getLogger(__name__)
 
 
 notified_presence_counter = Counter("synapse_handler_presence_notified_presence", "")
-federation_presence_out_counter = Counter("synapse_handler_presence_federation_presence_out", "")
+federation_presence_out_counter = Counter(
+    "synapse_handler_presence_federation_presence_out", "")
 presence_updates_counter = Counter("synapse_handler_presence_presence_updates", "")
 timers_fired_counter = Counter("synapse_handler_presence_timers_fired", "")
 federation_presence_counter = Counter("synapse_handler_presence_federation_presence", "")
@@ -55,8 +56,10 @@ bump_active_time_counter = Counter("synapse_handler_presence_bump_active_time",
 
 get_updates_counter = Counter("synapse_handler_presence_get_updates", "", ["type"])
 
-notify_reason_counter = Counter("synapse_handler_presence_notify_reason", "", ["reason"])
-state_transition_counter = Counter("synapse_handler_presence_state_transition", "", ["from", "to"]
+notify_reason_counter = Counter(
+    "synapse_handler_presence_notify_reason", "", ["reason"])
+state_transition_counter = Counter(
+    "synapse_handler_presence_state_transition", "", ["from", "to"]
 )
 
 
@@ -213,7 +216,8 @@ class PresenceHandler(object):
             60 * 1000,
         )
 
-        LaterGauge("synapse_handlers_presence_wheel_timer_size", "", [], lambda: len(self.wheel_timer))
+        LaterGauge("synapse_handlers_presence_wheel_timer_size", "", [],
+                   lambda: len(self.wheel_timer))
 
     @defer.inlineCallbacks
     def _on_shutdown(self):