mirror of
https://github.com/friendica/friendica
synced 2025-01-03 18:02:18 +00:00
Merge pull request #14425 from annando/expiry
Changed order of expiry commands
This commit is contained in:
commit
1f59dce99d
3 changed files with 6 additions and 5 deletions
|
@ -67,7 +67,7 @@ class Cron
|
||||||
$entries = DBA::select(
|
$entries = DBA::select(
|
||||||
'workerqueue',
|
'workerqueue',
|
||||||
['id', 'pid', 'executed', 'priority', 'command', 'parameter'],
|
['id', 'pid', 'executed', 'priority', 'command', 'parameter'],
|
||||||
['NOT `done` AND `pid` != 0'],
|
['NOT `done` AND `pid` != ? AND `executed` > ?', 0, DBA::NULL_DATETIME],
|
||||||
['order' => ['priority', 'retrial', 'created']]
|
['order' => ['priority', 'retrial', 'created']]
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|
|
@ -16,6 +16,7 @@ use Friendica\Network\HTTPException\BadRequestException;
|
||||||
use Friendica\Network\HTTPException\NotFoundException;
|
use Friendica\Network\HTTPException\NotFoundException;
|
||||||
use Friendica\Protocol\ActivityNamespace;
|
use Friendica\Protocol\ActivityNamespace;
|
||||||
use Friendica\Protocol\Salmon;
|
use Friendica\Protocol\Salmon;
|
||||||
|
use Friendica\Util\Network;
|
||||||
use Friendica\Util\XML;
|
use Friendica\Util\XML;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -44,7 +45,7 @@ class Xrd extends BaseModule
|
||||||
$mode = self::getAcceptedContentType($_SERVER['HTTP_ACCEPT'] ?? '', Response::TYPE_XML);
|
$mode = self::getAcceptedContentType($_SERVER['HTTP_ACCEPT'] ?? '', Response::TYPE_XML);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (substr($uri, 0, 4) === 'http') {
|
if (Network::isValidHttpUrl($uri)) {
|
||||||
$name = ltrim(basename($uri), '~');
|
$name = ltrim(basename($uri), '~');
|
||||||
$host = parse_url($uri, PHP_URL_HOST);
|
$host = parse_url($uri, PHP_URL_HOST);
|
||||||
} else if (preg_match('/^[[:alpha:]][[:alnum:]+-.]+:/', $uri)) {
|
} else if (preg_match('/^[[:alpha:]][[:alnum:]+-.]+:/', $uri)) {
|
||||||
|
|
|
@ -41,9 +41,6 @@ class ExpirePosts
|
||||||
Logger::notice('Expire posts - Delete orphaned entries');
|
Logger::notice('Expire posts - Delete orphaned entries');
|
||||||
self::deleteOrphanedEntries();
|
self::deleteOrphanedEntries();
|
||||||
|
|
||||||
Logger::notice('Expire posts - delete unused item-uri entries');
|
|
||||||
self::deleteUnusedItemUri();
|
|
||||||
|
|
||||||
Logger::notice('Expire posts - delete external posts');
|
Logger::notice('Expire posts - delete external posts');
|
||||||
self::deleteExpiredExternalPosts();
|
self::deleteExpiredExternalPosts();
|
||||||
|
|
||||||
|
@ -55,6 +52,9 @@ class ExpirePosts
|
||||||
Logger::notice('Expire posts - delete unused attachments');
|
Logger::notice('Expire posts - delete unused attachments');
|
||||||
self::deleteUnusedAttachments();
|
self::deleteUnusedAttachments();
|
||||||
|
|
||||||
|
Logger::notice('Expire posts - delete unused item-uri entries');
|
||||||
|
self::deleteUnusedItemUri();
|
||||||
|
|
||||||
DBA::releaseOptimizeLock();
|
DBA::releaseOptimizeLock();
|
||||||
Logger::notice('Expire posts - done');
|
Logger::notice('Expire posts - done');
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue