Skip to content

Commit

Permalink
clean up
Browse files Browse the repository at this point in the history
  • Loading branch information
piotr1212 committed Apr 27, 2020
1 parent 9653e7a commit 896b0a6
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 16 deletions.
11 changes: 0 additions & 11 deletions lib/carbon/cache.py
Expand Up @@ -237,17 +237,6 @@ def get_datapoints(self, metric):
"""Return a list of currently cached datapoints sorted by timestamp"""
return sorted(self.get(metric, {}).items(), key=by_timestamp)

def get_new_metrics(self):
yield self.new_metrics.pop()

def pop_new_metric(self):
# return first seen new metric or None if empty
#try:
# return self.new_metrics.pop(0)
#except IndexError:
# return None
return next(self.get_new_metrics())

def pop(self, metric):
with self.lock:
datapoint_index = defaultdict.pop(self, metric)
Expand Down
4 changes: 0 additions & 4 deletions lib/carbon/exceptions.py
@@ -1,6 +1,2 @@
class CarbonConfigException(Exception):
"""Raised when a carbon daemon is improperly configured"""

class CarbonCreatesLimiterException(Exception):
"""Raised when limitor is hit"""
pass
1 change: 0 additions & 1 deletion lib/carbon/writer.py
Expand Up @@ -21,7 +21,6 @@
from carbon.conf import settings
from carbon import log, instrumentation
from carbon.util import TokenBucket
from carbon.exceptions import CarbonCreatesLimiterException

from twisted.internet import reactor
from twisted.internet.task import LoopingCall
Expand Down

0 comments on commit 896b0a6

Please sign in to comment.