diff options
author | Amber Brown <hawkowl@atleastfornow.net> | 2018-05-21 19:47:37 -0500 |
---|---|---|
committer | Amber Brown <hawkowl@atleastfornow.net> | 2018-05-21 19:47:37 -0500 |
commit | df9f72d9e5fe264b86005208e0f096156eb03e4b (patch) | |
tree | a0a1127021434abd716deb4f7a17a132eaffe45d /synapse/push | |
parent | don't need the resource portion (diff) | |
download | synapse-df9f72d9e5fe264b86005208e0f096156eb03e4b.tar.xz |
replacing portions
Diffstat (limited to 'synapse/push')
-rw-r--r-- | synapse/push/httppusher.py | 13 | ||||
-rw-r--r-- | synapse/push/push_rule_evaluator.py | 2 |
2 files changed, 5 insertions, 10 deletions
diff --git a/synapse/push/httppusher.py b/synapse/push/httppusher.py index b077e1a446..e22088ad6f 100644 --- a/synapse/push/httppusher.py +++ b/synapse/push/httppusher.py @@ -20,22 +20,17 @@ from twisted.internet.error import AlreadyCalled, AlreadyCancelled from . import push_rule_evaluator from . import push_tools -import synapse from synapse.push import PusherConfigException from synapse.util.logcontext import LoggingContext from synapse.util.metrics import Measure -logger = logging.getLogger(__name__) +from prometheus_client import Counter -metrics = synapse.metrics.get_metrics_for(__name__) +logger = logging.getLogger(__name__) -http_push_processed_counter = metrics.register_counter( - "http_pushes_processed", -) +http_push_processed_counter = Counter("http_pushes_processed", "") -http_push_failed_counter = metrics.register_counter( - "http_pushes_failed", -) +http_push_failed_counter = Counter("http_pushes_failed", "") class HttpPusher(object): diff --git a/synapse/push/push_rule_evaluator.py b/synapse/push/push_rule_evaluator.py index 3601f2d365..c3e6c5c258 100644 --- a/synapse/push/push_rule_evaluator.py +++ b/synapse/push/push_rule_evaluator.py @@ -150,7 +150,7 @@ class PushRuleEvaluatorForEvent(object): # Caches (glob, word_boundary) -> regex for push. See _glob_matches regex_cache = LruCache(50000 * CACHE_SIZE_FACTOR) -register_cache("regex_push_cache", regex_cache) +register_cache("cache", "regex_push_cache", regex_cache) def _glob_matches(glob, value, word_boundary=False): |