remove the unregister call

This commit is contained in:
Victor Shyba 2021-06-04 12:34:00 -03:00
parent 4e6b4f179b
commit fb438dc108

View file

@ -21,7 +21,6 @@ import pkg_resources
import certifi import certifi
import aiohttp import aiohttp
from prometheus_client import Counter from prometheus_client import Counter
from prometheus_client.registry import REGISTRY
from lbry.schema.claim import Claim from lbry.schema.claim import Claim
@ -276,12 +275,6 @@ class LRUCacheWithMetrics:
def __del__(self): def __del__(self):
self.clear() self.clear()
if self._track_metrics: # needed for tests
try:
REGISTRY.unregister(self.hits)
REGISTRY.unregister(self.misses)
except AttributeError:
pass
class LRUCache: class LRUCache: