mirror of
https://github.com/zhamao-robot/zhamao-framework.git
synced 2026-07-21 07:35:34 +08:00
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:
17
src/ZM/Utils/ProcessManager.php
Normal file
17
src/ZM/Utils/ProcessManager.php
Normal 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user