From 90a367da279e08cfa4348b8eb55f4327dc942e72 Mon Sep 17 00:00:00 2001 From: Thor77 Date: Wed, 23 Aug 2017 20:47:06 +0200 Subject: [PATCH] Warn about online clients on logfile end --- tsstats/log.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tsstats/log.py b/tsstats/log.py index 3391078..10bf0ee 100644 --- a/tsstats/log.py +++ b/tsstats/log.py @@ -131,6 +131,11 @@ def parse_logs(log_glob, ident_map=None, online_dc=True, *args, **kwargs): events = filter(None, map(_parse_line, f)) # chain apply events to Client-obj clients.apply_events(itertools.chain.from_iterable(events)) + # warn for online clients + online_clients = list(filter(lambda c: c.connected, clients)) + logger.debug( + 'Some clients are still connected: %s' % online_clients + ) if len(clients) >= 1: # assemble Server-obj and yield yield Server(virtualserver_id, clients)