Skip to content

Commit 6a3742b

Browse files
author
Marius Cramer
committed
- fixed monitor cron job not deleting old values from db
1 parent 64466c9 commit 6a3742b

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/lib/classes/monitor_tools.inc.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -666,7 +666,7 @@ public function delOldRecords($type, $serverId) {
666666

667667
// $now = time();
668668
// $old = $now - (4 * 60); // 4 minutes
669-
$old = 'UNIX_TIMESTAMP() - 240';
669+
$old = 240; //seconds
670670

671671
/*
672672
* ATTENTION if i do NOT pay attention of the server id, i delete all data (of the type)
@@ -680,7 +680,7 @@ public function delOldRecords($type, $serverId) {
680680
'WHERE ' .
681681
' type = ?' .
682682
'AND ' .
683-
' created < ? ' .
683+
' created < UNIX_TIMESTAMP() - ?' .
684684
'AND ' .
685685
' server_id = ?';
686686
$app->dbmaster->query($sql, $type, $old, $serverId);

0 commit comments

Comments
 (0)