From 222d69218a88566c05ae354ca9823ab2ef0a6c29 Mon Sep 17 00:00:00 2001 From: dami Date: Fri, 22 Aug 2025 20:00:15 +0800 Subject: [PATCH] Update tool_task.py --- plugins/op_waf/tool_task.py | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/op_waf/tool_task.py b/plugins/op_waf/tool_task.py index 869ba593f..b1d74bcb4 100644 --- a/plugins/op_waf/tool_task.py +++ b/plugins/op_waf/tool_task.py @@ -150,7 +150,13 @@ def pSqliteDb(dbname='logs'): return conn def run(): - getCpuUsed() + now_t = int(time.time()) + logs_conn = pSqliteDb('logs') + del_hot_log = "delete from logs where time<{}".format(now_t) + print(del_hot_log) + r = logs_conn.execute(del_hot_log) + return 'ok' + if __name__ == "__main__": if len(sys.argv) > 1: