Skip to content

Commit 6e37892

Browse files
committed
delete only records for the local server from datalog so records with server_id 0 were preserverd.
1 parent 18dfce3 commit 6e37892

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

server/cron_daily.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,12 +130,12 @@
130130
#######################################################################################################
131131
//* Keep 7 days in sys_log
132132
$tstamp = time() - (60*60*24*7);
133-
$sql = "DELETE FROM sys_log WHERE tstamp < $tstamp";
133+
$sql = "DELETE FROM sys_log WHERE tstamp < $tstamp AND server_id = ".$conf["server_id"];
134134
$app->db->query($sql);
135135

136136
//* Keep 7 days in sys_datalog
137137
$tstamp = time() - (60*60*24*7);
138-
$sql = "DELETE FROM sys_datalog WHERE tstamp < $tstamp";
138+
$sql = "DELETE FROM sys_datalog WHERE tstamp < $tstamp AND server_id = ".$conf["server_id"];
139139
$app->db->query($sql);
140140

141141

0 commit comments

Comments
 (0)