eee
This commit is contained in:
@@ -19,7 +19,7 @@ class TaskExecute implements TaskInterface
|
||||
*/
|
||||
public function task(string $handler, mixed $data, int $dstWorkerId = -1, ?callable $finishFinishCallback = null): void
|
||||
{
|
||||
$array = class_implements($handler, false);
|
||||
$array = class_implements($handler, true);
|
||||
if (!in_array(OnTaskInterface::class, $array, true)) {
|
||||
throw new Exception('Task is not implement OnTaskInterface');
|
||||
}
|
||||
@@ -39,7 +39,7 @@ class TaskExecute implements TaskInterface
|
||||
*/
|
||||
public function taskWait(string $handler, mixed $data, float $timeout = 0.5, int $dstWorkerId = -1): mixed
|
||||
{
|
||||
$array = class_implements($handler, false);
|
||||
$array = class_implements($handler, true);
|
||||
if (!in_array(OnTaskInterface::class, $array, true)) {
|
||||
throw new Exception('Task is not implement OnTaskInterface');
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user