Switch all item deletion logging to info level

This commit is contained in:
Hypolite Petovan 2020-03-04 15:59:19 -05:00
parent b4597a643d
commit f047944b2d
5 changed files with 13 additions and 13 deletions

View file

@ -107,7 +107,7 @@ class DBClean {
Logger::log("found global item orphans: ".$count);
while ($orphan = DBA::fetch($r)) {
$last_id = $orphan["id"];
Logger::notice('Delete global orphan item', ['id' => $orphan['id'], 'guid' => $orphan['guid']]);
Logger::info('Delete global orphan item', ['id' => $orphan['id'], 'guid' => $orphan['guid']]);
DBA::delete('item', ['id' => $orphan["id"]]);
}
Worker::add(PRIORITY_MEDIUM, 'DBClean', 1, $last_id);
@ -130,7 +130,7 @@ class DBClean {
Logger::log("found item orphans without parents: ".$count);
while ($orphan = DBA::fetch($r)) {
$last_id = $orphan["id"];
Logger::notice('Delete orphan item', ['id' => $orphan['id'], 'guid' => $orphan['guid']]);
Logger::info('Delete orphan item', ['id' => $orphan['id'], 'guid' => $orphan['guid']]);
DBA::delete('item', ['id' => $orphan["id"]]);
}
Worker::add(PRIORITY_MEDIUM, 'DBClean', 2, $last_id);
@ -328,7 +328,7 @@ class DBClean {
Logger::log("found global item entries from expired threads: ".$count);
while ($orphan = DBA::fetch($r)) {
$last_id = $orphan["id"];
Logger::notice('Delete expired thread item', ['id' => $orphan['id'], 'guid' => $orphan['guid']]);
Logger::info('Delete expired thread item', ['id' => $orphan['id'], 'guid' => $orphan['guid']]);
DBA::delete('item', ['id' => $orphan["id"]]);
}
Worker::add(PRIORITY_MEDIUM, 'DBClean', 9, $last_id);

View file

@ -45,7 +45,7 @@ class Expire
$condition = ["`deleted` AND `changed` < UTC_TIMESTAMP() - INTERVAL 60 DAY"];
$rows = DBA::select('item', ['id', 'guid'], $condition);
while ($row = DBA::fetch($rows)) {
Logger::notice('Delete expired item', ['id' => $row['id'], 'guid' => $row['guid']]);
Logger::info('Delete expired item', ['id' => $row['id'], 'guid' => $row['guid']]);
DBA::delete('item', ['id' => $row['id']]);
}
DBA::close($rows);

View file

@ -43,7 +43,7 @@ class RemoveContact {
do {
$items = Item::select(['id', 'guid'], $condition, ['limit' => 100]);
while ($item = Item::fetch($items)) {
Logger::notice('Delete removed contact item', ['id' => $item['id'], 'guid' => $item['guid']]);
Logger::info('Delete removed contact item', ['id' => $item['id'], 'guid' => $item['guid']]);
DBA::delete('item', ['id' => $item['id']]);
}
DBA::close($items);