/** * Runs the current command. * * If an event dispatcher has been attached to the application, * events are also dispatched during the life-cycle of the command. * * @param SingletonCommand $command A Command instance * @param InputInterface $input An Input instance * @param OutputInterface $output An Output instance * * @return int 0 if everything went fine, or an error code * * @throws \Exception when the command being run threw an exception */ protected function doRunCommand(SingletonCommand $command, InputInterface $input, OutputInterface $output) { try { $command->lock(); return parent::doRunCommand($command, $input, $output); } catch (\Exception $e) { $command->unlock(); } }
/** * @param Container $container */ public function __construct(Container $container) { $this->container = $container; $this->videoLength = $container['config']['video_length']; $this->videoIntersectionLength = $container['config']['video_intersection_length']; $this->soapScheduleProvider = $container['SoapScheduleProvider']; parent::__construct($container['config']['project_root'] . $container['config']['tmp_dir']); }