Verified Commit c3319911 authored by Martin Petráček's avatar Martin Petráček
Browse files

monitor: fix mistake - do not clean stats on every restart

parent e0a289e3
......@@ -51,7 +51,7 @@ except:
logging.debug('Table "traffic" already exists')
# flow_ids are only unique (and meaningful) during one run of this script
try:
c.execute('UPDATE traffic SET flow_id = NULL, duration = 0, bytes_send = 0, bytes_received = 0')
c.execute('UPDATE traffic SET flow_id = NULL, duration = 0, bytes_send = 0, bytes_received = 0 WHERE flow_id IS NOT NULL')
con.commit()
except:
logging.debug('Error cleaning flow_id')
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment