logs
This commit is contained in:
1 parent
b52421c8b0
commit
bfd3213cc9
1 file changed
+6
-1
@@ -39,8 +39,11 @@ def main():
|
||||
cmd += ["--after-cursor", cur]
|
||||
|
||||
out = subprocess.check_output(cmd, text=True)
|
||||
lines = out.splitlines()
|
||||
|
||||
for line in out.splitlines():
|
||||
print(f"Must parse {len(lines)}")
|
||||
for line in lines:
|
||||
print(line)
|
||||
if not line or not line[0].isdigit():
|
||||
continue
|
||||
|
||||
@@ -58,6 +61,7 @@ def main():
|
||||
ip = m.group(1)
|
||||
|
||||
# store raw event
|
||||
print(f"Inserting {ip}")
|
||||
db.execute("INSERT INTO failures VALUES (?, ?)", (ts, ip))
|
||||
|
||||
# check cache
|
||||
@@ -90,3 +94,4 @@ def main():
|
||||
|
||||
if __name__ == "__main__":
|
||||
main()
|
||||
print("Parsed everything")
|
||||
Reference in new issue
Block a user