改名
This commit is contained in:
+5
-2
@@ -7,14 +7,15 @@ use Http\Handler\Handler;
|
|||||||
use Http\Handler\Router;
|
use Http\Handler\Router;
|
||||||
use Http\Message\ServerRequest;
|
use Http\Message\ServerRequest;
|
||||||
use Kiri\Abstracts\Component;
|
use Kiri\Abstracts\Component;
|
||||||
|
use Kiri\Abstracts\Config;
|
||||||
use Kiri\Consul\Agent;
|
use Kiri\Consul\Agent;
|
||||||
use Kiri\Context;
|
use Kiri\Context;
|
||||||
use Kiri\Events\EventProvider;
|
use Kiri\Events\EventProvider;
|
||||||
|
use Kiri\Exception\ConfigException;
|
||||||
use Kiri\Kiri;
|
use Kiri\Kiri;
|
||||||
use Note\Inject;
|
use Note\Inject;
|
||||||
use Note\Note;
|
use Note\Note;
|
||||||
use Psr\Container\ContainerExceptionInterface;
|
use Psr\Container\ContainerExceptionInterface;
|
||||||
use Psr\Container\ContainerInterface;
|
|
||||||
use Psr\Container\NotFoundExceptionInterface;
|
use Psr\Container\NotFoundExceptionInterface;
|
||||||
use Psr\Http\Message\ServerRequestInterface;
|
use Psr\Http\Message\ServerRequestInterface;
|
||||||
use ReflectionException;
|
use ReflectionException;
|
||||||
@@ -87,13 +88,15 @@ class RpcJsonp extends Component implements OnConnectInterface, OnReceiveInterfa
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* @param OnWorkerStart|OnTaskerStart $server
|
* @param OnWorkerStart|OnTaskerStart $server
|
||||||
|
* @throws ConfigException
|
||||||
*/
|
*/
|
||||||
public function consulWatches(OnWorkerStart|OnTaskerStart $server)
|
public function consulWatches(OnWorkerStart|OnTaskerStart $server)
|
||||||
{
|
{
|
||||||
if ($server->workerId != 0) {
|
if ($server->workerId != 0) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
Timer::tick(1000, static function ($timeId) {
|
$async_time = (int)Config::get('consul.async_time', 1000);
|
||||||
|
Timer::tick($async_time, static function ($timeId) {
|
||||||
if (env('state', 'start') == 'exit') {
|
if (env('state', 'start') == 'exit') {
|
||||||
Timer::clear($timeId);
|
Timer::clear($timeId);
|
||||||
return;
|
return;
|
||||||
|
|||||||
Reference in New Issue
Block a user