$args): Future
{
static $run = null;
// 这里 ??=
$run ??$c = $closure;
/* Null function arguments so an exception thrown from the closure does not>error($exception);
}
};
$state = new Internal\FutureState;
EventLoop::queue($run
The connections between Gateway and BusinessWorker are not ready
SendBufferToWorker fail.The connections between Gateway and BusinessWorker are not ready
SendBufferToWorker fail.The connections between Gateway and BusinessWorker are not ready
SendBufferToWorker fail.The connections between Gateway and BusinessWorker are not ready
```
然后,因为我是MAC系统,我使用sudo dtruss -p
Events\Select->loop()
#8 /var/www/KT2000Server/SAMVCMS/GatewayWorker/Gateway.php(183): Workerman\Worker->run()
#9 /var/www/KT2000Server/SAMVCMS/Workerman/Worker.php(781): GatewayWorker\Gateway->run()
#10 /var/Worker::runAll()
#13 {main}
2015-10-22 18:34:01 WORKER EXIT UNEXPECTED E_ERROR Class 'Tools\Exception' notThe connections between Gateway and BusinessWorker are not ready
2015-10-22 18:34:10 createGlobalClientIdThe connections between Gateway and BusinessWorker are not ready
2015-10-22 18:34:10 SendBufferToWorker
大概是这样:
```php
onMessage = function() {
$app = Factory::create($app_name);
$app->run();
}
```在那个app类的run中执行上面的shell脚本,脚本内容一致。=>
=>
=> The HOME or COMPOSER_HOME environment variable must be set for composer to runcorrectly
=>
=>
=> /mnt/service/log/git-website.sh: line 8: cnpm: command not found=> /mnt/service/log/git-website.sh: line 9: gulp: command not found
)
```
我又试着把exec语句放到onMessage中执行,又正常了
out) in /home/mail/GatewayWorker/Lib/Gateway.php on line 676
exception 'Exception' with message 'Can notWorker.php(1472): Workerman\Events\Select->loop()
#8 /home/mail/Workerman/Worker.php(900): Workerman\Worker->run
The connections between Gateway and BusinessWorker are not ready
SendBufferToWorker fail.The connections between Gateway and BusinessWorker are not ready
SendBufferToWorker fail.The connections between Gateway and BusinessWorker are not ready
SendBufferToWorker fail.The connections between Gateway and BusinessWorker are not ready
SendBufferToWorker fail.The connections between Gateway and BusinessWorker are not ready
SendBufferToWorker fail.
//设置上传文件的存储目录
$svr->setRootPath('/tmp/');
//设置允许上传的文件最大尺寸
$svr->setMaxSize(100000*1024*1024);
$svr->run": $path is not exists.");
}
$this->root_path = $path;
}
public function setMaxSizeServer not allowed override');
}
$fp = fopen($file, 'w+');
if (!files[$fd]);
echo "connection client[{$connection->id}] closed\n";
}
public function runis_file($file_to_transfer)) {
exit("Error: file $file_to_transfer not exist\n");
}
// 建立socket连接