Skip to content

Commit

Permalink
Refactored ResultEventAsyncTask
Browse files Browse the repository at this point in the history
  • Loading branch information
programarivm committed Oct 8, 2024
1 parent 4b687a7 commit 83929ee
Showing 1 changed file with 1 addition and 21 deletions.
22 changes: 1 addition & 21 deletions src/Command/Data/ResultEventAsyncTask.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@

namespace ChessServer\Command\Data;

use ChessServer\Db;
use Spatie\Async\Task;

class ResultEventAsyncTask extends Task
class ResultEventAsyncTask extends AbstractDataAsyncTask
{
const SQL_LIKE = [

Expand All @@ -16,23 +13,6 @@ class ResultEventAsyncTask extends Task
'Result',
];

private array $params;

private array $env;

private Db $db;

public function __construct(array $params, array $env)
{
$this->params = $params;
$this->env = $env;
}

public function configure()
{
$this->db = new Db($this->env['db']);
}

public function run()
{
$sql = 'SELECT ECO, COUNT(*) as total FROM games WHERE ';
Expand Down

0 comments on commit 83929ee

Please sign in to comment.