Ejemplo n.º 1
0
 protected function execute(InputInterface $input, OutputInterface $output)
 {
     $sw = Util::getStopwatch();
     $sw->start('provision');
     try {
         // Run provisioning tasks
         $this->runTasks($input, $output);
     } catch (\Exception $e) {
         $output->writeError($e->getMessage());
     }
     $duration = round($sw->stop('provision')->getDuration() / 1000, 2);
     $duration_unit = 's';
     if ($duration > 60) {
         $duration = round($duration / 60, 2);
         $duration_unit = 'm';
     }
     $output->writeInfo("Finished in {$duration}{$duration_unit}");
 }