Skip to content

[QUESTION]如果配置里对有多个server服务?如果有单独管理的需求怎么处理 #1054

@sonhineboy

Description

@sonhineboy

Before you submit this issue, you has been search all existed issues and search the documentation

  • [] I've been search all existed issues
  • [] I've been read all documentation

描述

代码如下:

 'servers' => [
        [
            'name' => 'http',
            'type' => Server::SERVER_HTTP,
            'host' => '0.0.0.0',
            'port' => 9501,
            'sock_type' => SWOOLE_SOCK_TCP,
            'callbacks' => [
         
       SwooleEvent::ON_REQUEST => [Hyperf\HttpServer\Server::class, 'onRequest'],
            ],
        ],
        [
            'name' => 'jsonrpc-http',
            'type' => Server::SERVER_HTTP,
            'host' => '0.0.0.0',
            'port' => 9504,
            'sock_type' => SWOOLE_SOCK_TCP,
            'callbacks' => [
                SwooleEvent::ON_REQUEST => [\Hyperf\JsonRpc\HttpServer::class, 'onRequest'],
            ],
        ],
    ],

现在我这有两个server ,一个 是http,一个是jsonrpc-http
问题如下:
假如我的jsonrpc服务代码有变动;我怎么样等单独重启 名字为 jsonrpc-http 的服务。不重启http 的服务

建议:

在命令上增加单独服务的管理
php bin/hyperf.php [动作] [服务名]
例如: php bin/hyperf.php start http 等等

Metadata

Metadata

Assignees

No one assigned

    Labels

    questionFurther information is requested

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions