From 7909b25b4c62968e61323114e792c0ad60f9b6dc Mon Sep 17 00:00:00 2001 From: Christian Pointner Date: Tue, 14 Oct 2014 01:48:42 +0200 Subject: sendData now uses new ClientList directly --- src/daq/accesslog/sfive-accesslog.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'src') diff --git a/src/daq/accesslog/sfive-accesslog.py b/src/daq/accesslog/sfive-accesslog.py index 1914820..89e2c1b 100755 --- a/src/daq/accesslog/sfive-accesslog.py +++ b/src/daq/accesslog/sfive-accesslog.py @@ -256,7 +256,7 @@ class AccessLog(): clients.update(linedata) else: while linedata['ts'] > nextts: - self._sendDataset(nextts, self._duration, clients.getCnt(), clients.getBytesSent()) + self._sendDataset(nextts, self._duration, clients) cnt += 1 lastts = nextts nextts = lastts + datetime.timedelta(seconds=self._duration) @@ -266,7 +266,7 @@ class AccessLog(): # send remaining data if nextts: - self._sendDataset(nextts, self._duration, clients.getCnt(), clients.getBytesSent()) + self._sendDataset(nextts, self._duration, clients) cnt += 1 except re.error as e: @@ -274,12 +274,12 @@ class AccessLog(): return cnt - def _sendDataset(self, timestamp, duration, client_count, bytes_sent): + def _sendDataset(self, timestamp, duration, clients): data = { "start-time": timestamp.isoformat('T'), "duration-ms": duration * 1000, "data": { - "client-count": client_count, - "bytes-sent": bytes_sent + "client-count": clients.getCnt(), + "bytes-sent": clients.getBytesSent() } } self._proto.sendDatagram('%s\n' % (json.dumps(data))); -- cgit v1.2.3