in loggy.py [0:0]
def push_if_needed(self):
if self.pending:
now = time.time()
if now - MAX_IDLE_TIME >= self.last_push or len(self.pending) > MAX_PENDING_DOCS:
nt = NodeThread(self)
nt.start()
self.pending = []
self.last_push = now