예제 #1
0
 /**
  * @covers Gloubster\Server\GloubsterServer::create
  */
 public function testCreate()
 {
     $loop = $this->getEventLoop();
     $conf = $this->getTestConfiguration();
     $logger = $this->getLogger();
     GloubsterServer::create($loop, $conf, $logger);
 }
예제 #2
0
 public function doExecute(InputInterface $input, OutputInterface $output)
 {
     $loop = LoopFactory::create();
     $server = GloubsterServer::create($loop, $this->conf, $this->container['monolog']);
     $server->register(new ListenersComponent());
     $server->register(new LogBuilderComponent());
     $server->register(new RabbitMQMonitorComponent());
     $server->register(new ServerMonitorComponent());
     $server->register(new WorkerMonitorBroadcastComponent());
     if ($input->getOption('test')) {
         $server->register(new StopComponent());
     }
     $server->run();
 }