Skip to content

Commit

Permalink
Refactored SearchCommand
Browse files Browse the repository at this point in the history
  • Loading branch information
programarivm committed Oct 8, 2024
1 parent 0caacb8 commit 094fc61
Showing 1 changed file with 1 addition and 11 deletions.
12 changes: 1 addition & 11 deletions src/Command/Data/SearchCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -25,17 +25,7 @@ public function run(AbstractSocket $socket, array $argv, int $id)
{
$params = json_decode(stripslashes($argv[1]), true);

$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 SearchAsyncTask($params, $env), 81920)
$this->pool->add(new SearchAsyncTask($params), 81920)
->then(function ($result) use ($socket, $id) {
return $socket->getClientStorage()->send([$id], [
$this->name => $result,
Expand Down

0 comments on commit 094fc61

Please sign in to comment.