getName(), $input->getOptions()); /** * Lock command in database. We want to run only one command in the same time */ $hypervisor->lock(); do { /** * Let's do something funny! */ parent::execute($input, $output); /** * Ping... Pong... Ping... */ $hypervisor->ping(); /** * Time to sleep! */ $hypervisor->sleep($this->loopInterval); /** * @TODO remove me */ $this->loopCounter++; } while (!$hypervisor->shouldBeStopped()); /** * Unlock command in database */ $hypervisor->unlock(); } /** * @return int */ final protected function getLoopCounter() { return $this->loopCounter; } } //