limit logging

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

View file

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