mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-07 00:35:36 +08:00
add OnPipeMessageEvent.php add ProcessManager.php add WorkerCache component fix route bug correct Exception to ZMException
17 lines
378 B
PHP
17 lines
378 B
PHP
<?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);
|
|
}
|
|
} |