Skip to content

Commit

Permalink
fix: fix DbQueryExecutedListener and delete redundant ResumeExitCoord…
Browse files Browse the repository at this point in the history
…inatorListener
  • Loading branch information
albertcht committed Jul 30, 2024
1 parent 48e0c7d commit 95d679b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 41 deletions.
10 changes: 3 additions & 7 deletions app/Listeners/DbQueryExecutedListener.php
Original file line number Diff line number Diff line change
Expand Up @@ -13,22 +13,18 @@

use Hyperf\Collection\Arr;
use Hyperf\Database\Events\QueryExecuted;
use Hyperf\Event\Annotation\Listener;
use Hyperf\Event\Contract\ListenerInterface;
use Hyperf\Logger\LoggerFactory;
use Hyperf\Framework\Logger\StdoutLogger;
use Psr\Container\ContainerInterface;
use Psr\Log\LoggerInterface;

class DbQueryExecutedListener implements ListenerInterface
{
/**
* @var LoggerInterface
*/
private $logger;
private LoggerInterface $logger;

public function __construct(ContainerInterface $container)
{
$this->logger = $container->get(LoggerFactory::class)->get('sql');
$this->logger = $container->get(StdoutLogger::class);
}

public function listen(): array
Expand Down
33 changes: 0 additions & 33 deletions app/Listeners/ResumeExitCoordinatorListener.php

This file was deleted.

2 changes: 1 addition & 1 deletion config/listeners.php
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
<?php

declare(strict_types=1);
/**
* This file is part of Hyperf.
Expand All @@ -13,4 +12,5 @@
Hyperf\ExceptionHandler\Listener\ErrorExceptionHandler::class,
Hyperf\Coordinator\Listener\ResumeExitCoordinatorListener::class,
SwooleTW\Hyperf\Foundation\Queue\Listeners\QueueHandleListener::class,
// App\Listeners\DbQueryExecutedListener::class,
];

0 comments on commit 95d679b

Please sign in to comment.