Skip to content
Snippets Groups Projects
Commit 1859cd59 authored by Piotr Maślanka's avatar Piotr Maślanka
Browse files

removed extraneous logging

parent 48fc0e82
No related branches found
Tags v2.5.2
No related merge requests found
from abc import ABCMeta, abstractmethod
import typing as tp
import logging
import functools
import psutil
......@@ -8,8 +7,6 @@ __all__ = ['GB', 'MB', 'KB', 'Any', 'All', 'GlobalAbsoluteValue', 'GlobalRelativ
'LocalRelativeValue', 'LocalAbsoluteValue', 'BaseCondition', 'ZerothSeverity',
'CustomCondition', 'Not']
logger = logging.getLogger(__name__)
GB = 1024*1024*1024
MB = 1024*1024
KB = 1024
......@@ -136,7 +133,5 @@ class CustomCondition(BaseCondition):
self.callable = callable_
def can_fire(self, local_memory_data, local_maximum_consume: tp.Optional[int]) -> bool:
v = self.callable()
logger.warning('Custom condition %s returning %s' % (self.callable, v))
return v
return self.callable()
......@@ -131,7 +131,6 @@ class MemoryPressureManager(TerminableThread):
memory_info = self.process.memory_info()
for level, condition in reversed(list(enumerate(self.severity_levels))):
if condition.can_fire(memory_info, self.maximum_available):
logger.warning('Condition %s was true on level %s' % (condition, level))
return level
@staticmethod
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment