Skip to content
This repository has been archived by the owner on Sep 10, 2024. It is now read-only.

Commit

Permalink
revert task_enable_coroutine support
Browse files Browse the repository at this point in the history
  • Loading branch information
albertcht committed Mar 5, 2019
1 parent b341335 commit 5d1a7d0
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/Server/Manager.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Exception;
use Throwable;
use Swoole\Process;
use Swoole\Server\Task;
use Illuminate\Support\Str;
use SwooleTW\Http\Helpers\OS;
use SwooleTW\Http\Server\Sandbox;
Expand Down Expand Up @@ -256,13 +257,13 @@ protected function resetOnRequest()
* Set onTask listener.
*
* @param mixed $server
* @param string|\Swoole\Server\Task $taskIdOrTask
* @param string $srcWorkerId Optional
* @param mixed $data Optional
* @param string|\Swoole\Server\Task $taskId or $task
* @param string $srcWorkerId
* @param mixed $data
*/
public function onTask($server, ...$args)
public function onTask($server, $taskId, $srcWorkerId, $data)
{
$this->container->make('events')->dispatch('swoole.task', [$server, $args]);
$this->container->make('events')->dispatch('swoole.task', func_get_args());

try {
// push websocket message
Expand Down

0 comments on commit 5d1a7d0

Please sign in to comment.