Skip to content

Commit 45841f0

Browse files
author
vogelor
committed
Added cleanup of the new sys_remoteaction - Table to the cron_daily.php
1 parent 0061e0b commit 45841f0

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

server/cron_daily.php

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -221,7 +221,13 @@ function setConfigVar( $filename, $varName, $varValue ) {
221221
* if they are NOT ok, the server will try to process them in 1 minute and so the
222222
* error appears again after 1 minute. So it is no problem to delete the old one!
223223
*/
224-
$sql = "DELETE FROM sys_log WHERE tstamp < $tstamp AND server_id != 0";
224+
$sql = "DELETE FROM sys_log WHERE tstamp < " . $tstamp . " AND server_id != 0";
225+
$app->dbmaster->query($sql);
226+
227+
/*
228+
* Delete all remote-actions "done" and older than 7 days
229+
*/
230+
$sql = "DELETE FROM sys_remoteaction WHERE tstamp < " . $tstamp . " AND action_status = 'ok'";
225231
$app->dbmaster->query($sql);
226232

227233
/*

0 commit comments

Comments
 (0)