diff --git a/webman.php b/webman.php index 9ebc777..1cd5d9d 100644 --- a/webman.php +++ b/webman.php @@ -7,12 +7,12 @@ use Workerman\Worker; Adapterman::init(); $http_worker = new Worker('http://127.0.0.1:7010'); -$http_worker->count = swoole_cpu_num() ?? 2; +$http_worker->count = getenv('WEBMAN_WORKERS') ?? (swoole_cpu_num() ?? 1); $http_worker->name = 'AdapterMan'; $http_worker->onWorkerStart = static function () { //init(); - require __DIR__.'/start.php'; + require __DIR__ . '/start.php'; }; $http_worker->onMessage = static function ($connection, $request) {