Replace Logger with DI::logger() in Process Worker classes

This commit is contained in:
Art4 2025-01-13 13:07:14 +00:00
parent bcf784254f
commit c90b485089
3 changed files with 9 additions and 9 deletions

View file

@ -7,7 +7,7 @@
namespace Friendica\Worker;
use Friendica\Core\Logger;
use Friendica\DI;
use Friendica\Protocol\ActivityPub\Queue;
class ProcessQueue
@ -21,8 +21,8 @@ class ProcessQueue
*/
public static function execute(int $id)
{
Logger::info('Start processing queue entry', ['id' => $id]);
DI::logger()->info('Start processing queue entry', ['id' => $id]);
$result = Queue::process($id);
Logger::info('Successfully processed queue entry', ['result' => $result, 'id' => $id]);
DI::logger()->info('Successfully processed queue entry', ['result' => $result, 'id' => $id]);
}
}

View file

@ -7,7 +7,7 @@
namespace Friendica\Worker;
use Friendica\Core\Logger;
use Friendica\DI;
use Friendica\Protocol\ActivityPub\Queue;
class ProcessReplyByUri
@ -21,8 +21,8 @@ class ProcessReplyByUri
*/
public static function execute(string $uri)
{
Logger::info('Start processing queued replies', ['url' => $uri]);
DI::logger()->info('Start processing queued replies', ['url' => $uri]);
$count = Queue::processReplyByUri($uri);
Logger::info('Successfully processed queued replies', ['count' => $count, 'url' => $uri]);
DI::logger()->info('Successfully processed queued replies', ['count' => $count, 'url' => $uri]);
}
}

View file

@ -7,7 +7,7 @@
namespace Friendica\Worker;
use Friendica\Core\Logger;
use Friendica\DI;
use Friendica\Protocol\ActivityPub\Queue;
class ProcessUnprocessedEntries
@ -19,8 +19,8 @@ class ProcessUnprocessedEntries
*/
public static function execute()
{
Logger::info('Start processing unprocessed entries');
DI::logger()->info('Start processing unprocessed entries');
Queue::processAll();
Logger::info('Successfully processed unprocessed entries');
DI::logger()->info('Successfully processed unprocessed entries');
}
}