Improved processing of leftover queued posts
This commit is contained in:
parent
35cf140cb2
commit
c7739ef9c4
|
@ -752,6 +752,7 @@ class Processor
|
||||||
{
|
{
|
||||||
$post = self::getUriIdForFeaturedCollection($activity);
|
$post = self::getUriIdForFeaturedCollection($activity);
|
||||||
if (empty($post)) {
|
if (empty($post)) {
|
||||||
|
Queue::remove($activity);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -252,12 +252,7 @@ class Queue
|
||||||
{
|
{
|
||||||
$entries = DBA::select('inbox-entry', ['id', 'type', 'object-type', 'object-id', 'in-reply-to-id'], ["`trust` AND `wid` IS NULL"], ['order' => ['id' => true]]);
|
$entries = DBA::select('inbox-entry', ['id', 'type', 'object-type', 'object-id', 'in-reply-to-id'], ["`trust` AND `wid` IS NULL"], ['order' => ['id' => true]]);
|
||||||
while ($entry = DBA::fetch($entries)) {
|
while ($entry = DBA::fetch($entries)) {
|
||||||
// Don't process entries of items that are answer to nonexistent posts
|
if (!self::isProcessable($entry['id'])) {
|
||||||
if (!empty($entry['in-reply-to-id']) && !Post::exists(['uri' => $entry['in-reply-to-id']])) {
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
// We don't need to process entries that depend on already existing entries.
|
|
||||||
if (!empty($entry['in-reply-to-id']) && DBA::exists('inbox-entry', ["`id` != ? AND `object-id` = ?", $entry['id'], $entry['in-reply-to-id']])) {
|
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
Logger::debug('Process leftover entry', $entry);
|
Logger::debug('Process leftover entry', $entry);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user