Add guid context to item deletion logging

This commit is contained in:
Hypolite Petovan
2020-03-03 01:48:06 -05:00
parent 6ae5f705b6
commit 86a6268aac
4 changed files with 12 additions and 12 deletions
+2 -2
View File
@@ -43,9 +43,9 @@ class Expire
Logger::log('Delete expired items', Logger::DEBUG);
// physically remove anything that has been deleted for more than two months
$condition = ["`deleted` AND `changed` < UTC_TIMESTAMP() - INTERVAL 60 DAY"];
$rows = DBA::select('item', ['id'], $condition);
$rows = DBA::select('item', ['id', 'guid'], $condition);
while ($row = DBA::fetch($rows)) {
Logger::notice('Delete expired item', ['id' => $row["id"]]);
Logger::notice('Delete expired item', ['id' => $row['id'], 'guid' => $row['guid']]);
DBA::delete('item', ['id' => $row['id']]);
}
DBA::close($rows);