Update tool_task.py

This commit is contained in:
dami
2025-08-22 20:00:15 +08:00
parent ae03da927e
commit 222d69218a
+7 -1
View File
@@ -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: