update to 2.2.0 version

add OnPipeMessageEvent.php
add ProcessManager.php
add WorkerCache component
fix route bug
correct Exception to ZMException
This commit is contained in:
jerry
2021-01-20 16:11:04 +08:00
parent f999e689bf
commit c68083484a
12 changed files with 260 additions and 66 deletions

View File

@@ -0,0 +1,17 @@
<?php
namespace ZM\Utils;
class ProcessManager
{
public static function runOnTask($param, $timeout = 0.5, $dst_worker_id = -1) {
return server()->taskwait([
"action" => "runMethod",
"class" => $param["class"],
"method" => $param["method"],
"params" => $param["params"]
], $timeout, $dst_worker_id);
}
}