limit logging

This commit is contained in:
j 2019-02-02 23:30:29 +05:30
parent ef2b56e0a9
commit 0c2ad46e71

View file

@ -523,7 +523,8 @@ class Nodes(Thread):
while not state.shutdown:
args = self._q.get()
if args:
logger.debug('processing nodes queue: next: "%s", %s entries in queue', args[0], self._q.qsize())
if DEBUG_NODES:
logger.debug('processing nodes queue: next: "%s", %s entries in queue', args[0], self._q.qsize())
if args[0] == 'add':
self._add(*args[1:])
elif args[0] == 'pull':
@ -532,7 +533,7 @@ class Nodes(Thread):
self._call(*args)
def queue(self, *args):
if args:
if args and DEBUG_NODES:
logger.debug('queue "%s", %s entries in queue', args, self._q.qsize())
self._q.put(list(args))