eee
This commit is contained in:
+9
-12
@@ -8,15 +8,6 @@ use Kiri\Server\ServerInterface;
|
||||
class TaskExecute implements TaskInterface
|
||||
{
|
||||
|
||||
/**
|
||||
* @var ServerInterface
|
||||
*/
|
||||
#[Container(ServerInterface::class)]
|
||||
public ServerInterface $server;
|
||||
|
||||
|
||||
|
||||
|
||||
/**
|
||||
* @param mixed $data
|
||||
* @param float $timeout
|
||||
@@ -25,7 +16,9 @@ class TaskExecute implements TaskInterface
|
||||
*/
|
||||
public function taskWait(mixed $data, float $timeout = 0.5, int $dstWorkerId = -1): mixed
|
||||
{
|
||||
return $this->server->taskwait($data, $timeout, $dstWorkerId);
|
||||
$server = \Kiri::getDi()->get(ServerInterface::class);
|
||||
|
||||
return $server->taskwait($data, $timeout, $dstWorkerId);
|
||||
}
|
||||
|
||||
|
||||
@@ -36,7 +29,9 @@ class TaskExecute implements TaskInterface
|
||||
*/
|
||||
public function taskCo(array $tasks, float $timeout = 0.5): false|array
|
||||
{
|
||||
return $this->server->taskCo($tasks, $timeout);
|
||||
$server = \Kiri::getDi()->get(ServerInterface::class);
|
||||
|
||||
return $server->taskCo($tasks, $timeout);
|
||||
}
|
||||
|
||||
|
||||
@@ -47,7 +42,9 @@ class TaskExecute implements TaskInterface
|
||||
*/
|
||||
public function taskWaitMulti(array $tasks, float $timeout = 0.5): false|array
|
||||
{
|
||||
return $this->server->taskWaitMulti($tasks, $timeout);
|
||||
$server = \Kiri::getDi()->get(ServerInterface::class);
|
||||
|
||||
return $server->taskWaitMulti($tasks, $timeout);
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user