for testing and deploying your application
for finding and fixing issues
for empowering human code reviews
<?php
/**
* @author jan huang <[email protected]>
* @copyright 2016
*
* @see https://www.github.com/janhuang
* @see https://fastdlabs.com
*/
namespace FastD\Servitization;
use FastD\Pool\PoolInterface;
use swoole_server;
* Trait OnWorkerStart.
trait OnWorkerStart
{
* @param swoole_server $server
* @param int $worker_id
public function onWorkerStart(swoole_server $server, $worker_id)
parent::onWorkerStart($server, $worker_id);
foreach (app() as $service) {
if ($service instanceof PoolInterface) {
$service->initPool();
}