Merge pull request #9616 from annando/expiry-notification-priority
Configuration for the priority of the notification for expired messages
This commit is contained in:
commit
aa4372447a
|
@ -1186,7 +1186,9 @@ class Item
|
||||||
self::markForDeletion(['uri' => $item['uri'], 'deleted' => false], $priority);
|
self::markForDeletion(['uri' => $item['uri'], 'deleted' => false], $priority);
|
||||||
|
|
||||||
// send the notification upstream/downstream
|
// send the notification upstream/downstream
|
||||||
|
if ($priority) {
|
||||||
Worker::add(['priority' => $priority, 'dont_fork' => true], "Notifier", Delivery::DELETION, intval($item['id']));
|
Worker::add(['priority' => $priority, 'dont_fork' => true], "Notifier", Delivery::DELETION, intval($item['id']));
|
||||||
|
}
|
||||||
} elseif ($item['uid'] != 0) {
|
} elseif ($item['uid'] != 0) {
|
||||||
Post\User::update($item['uri-id'], $item['uid'], ['hidden' => true]);
|
Post\User::update($item['uri-id'], $item['uid'], ['hidden' => true]);
|
||||||
|
|
||||||
|
@ -3111,6 +3113,8 @@ class Item
|
||||||
|
|
||||||
$expired = 0;
|
$expired = 0;
|
||||||
|
|
||||||
|
$priority = DI::config()->get('system', 'expire-notify-priority');
|
||||||
|
|
||||||
while ($item = Item::fetch($items)) {
|
while ($item = Item::fetch($items)) {
|
||||||
// don't expire filed items
|
// don't expire filed items
|
||||||
|
|
||||||
|
@ -3130,7 +3134,7 @@ class Item
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
self::markForDeletionById($item['id'], PRIORITY_LOW);
|
self::markForDeletionById($item['id'], $priority);
|
||||||
|
|
||||||
++$expired;
|
++$expired;
|
||||||
}
|
}
|
||||||
|
|
|
@ -237,6 +237,10 @@ return [
|
||||||
// restricts develop log writes to requests originating from this IP address.
|
// restricts develop log writes to requests originating from this IP address.
|
||||||
'dlogip' => '',
|
'dlogip' => '',
|
||||||
|
|
||||||
|
// expire-notify-priority (integer)
|
||||||
|
// Priority for the expirary notification
|
||||||
|
'expire-notify-priority' => PRIORITY_LOW,
|
||||||
|
|
||||||
// free_crawls (Integer)
|
// free_crawls (Integer)
|
||||||
// Number of "free" searches when system => permit_crawling is enabled.
|
// Number of "free" searches when system => permit_crawling is enabled.
|
||||||
'free_crawls' => 10,
|
'free_crawls' => 10,
|
||||||
|
|
Loading…
Reference in New Issue
Block a user