This commit is contained in:
2023-04-22 02:13:01 +08:00
parent e3a5980648
commit 61bd740832
+2 -2
View File
@@ -39,7 +39,7 @@ class Task implements TaskInterface
* @throws NotFoundExceptionInterface * @throws NotFoundExceptionInterface
* @throws ReflectionException * @throws ReflectionException
*/ */
private function onFinish(Server $server, int $task_id, mixed $data): void public function onFinish(Server $server, int $task_id, mixed $data): void
{ {
event(new OnTaskFinish($task_id, $data)); event(new OnTaskFinish($task_id, $data));
} }
@@ -53,7 +53,7 @@ class Task implements TaskInterface
* @return mixed * @return mixed
* @throws ReflectionException * @throws ReflectionException
*/ */
private function onTask(Server $server, int $task_id, int $src_worker_id, mixed $data): mixed public function onTask(Server $server, int $task_id, int $src_worker_id, mixed $data): mixed
{ {
$data = json_decode($data, true); $data = json_decode($data, true);
if (is_null($data)) { if (is_null($data)) {