Files
kiri-core/HttpServer/Events/OnFinish.php
T
2020-09-04 01:05:33 +08:00

27 lines
423 B
PHP

<?php
namespace HttpServer\Events;
use Exception;
use HttpServer\Abstracts\Callback;
use Swoole\Server;
class OnFinish extends Callback
{
/**
* @param Server $server
* @param $task_id
* @param $data
* @throws Exception
*/
public function onHandler(Server $server, $task_id, $data)
{
$data = json_decode($data, true);
$data['work_id'] = $task_id;
$this->write(var_export($data, true), 'Task');
}
}