2022-07-27 20:59:42 +00:00
|
|
|
<?php
|
2024-08-24 15:27:00 +02:00
|
|
|
|
|
|
|
// Copyright (C) 2010-2024, the Friendica project
|
|
|
|
// SPDX-FileCopyrightText: 2010-2024 the Friendica project
|
|
|
|
//
|
|
|
|
// SPDX-License-Identifier: AGPL-3.0-or-later
|
2022-07-27 20:59:42 +00:00
|
|
|
|
|
|
|
namespace Friendica\Worker;
|
|
|
|
|
|
|
|
use Friendica\Core\Logger;
|
|
|
|
use Friendica\Protocol\ActivityPub\Queue;
|
|
|
|
|
|
|
|
class ProcessQueue
|
|
|
|
{
|
|
|
|
/**
|
|
|
|
* Process queue entry
|
|
|
|
*
|
|
|
|
* @param int $id queue id
|
|
|
|
*
|
|
|
|
* @return void
|
|
|
|
*/
|
|
|
|
public static function execute(int $id)
|
|
|
|
{
|
|
|
|
Logger::info('Start processing queue entry', ['id' => $id]);
|
|
|
|
$result = Queue::process($id);
|
|
|
|
Logger::info('Successfully processed queue entry', ['result' => $result, 'id' => $id]);
|
|
|
|
}
|
|
|
|
}
|