Skip to content

Commit

Permalink
Refactored RankingCommand
Browse files Browse the repository at this point in the history
  • Loading branch information
programarivm committed Oct 8, 2024
1 parent b15f6ae commit 281673d
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/Command/Data/RankingCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -20,17 +20,7 @@ public function validate(array $argv)

public function run(AbstractSocket $socket, array $argv, int $id)
{
$env = [
'db' => [
'driver' => $_ENV['DB_DRIVER'],
'host' => $_ENV['DB_HOST'],
'database' => $_ENV['DB_DATABASE'],
'username' => $_ENV['DB_USERNAME'],
'password' => $_ENV['DB_PASSWORD'],
],
];

$this->pool->add(new RankingAsyncTask($env))
$this->pool->add(new RankingAsyncTask())
->then(function ($result) use ($socket, $id) {
return $socket->getClientStorage()->send([$id], [
$this->name => $result,
Expand Down

0 comments on commit 281673d

Please sign in to comment.