original_string: private function startRestoreService( StorageboxData $data, $backupKey, Database $database, OutputInterface $output) {
  		$stackName = $data->getBackup()->getStackName();
  
  		$restoreService = new Service();
  		$restoreService->setImage('ipunktbs/xtrabackup:1.1.1');
  		$restoreService->setName('restore-'.$backupKey);
  		$restoreService->setCommand('restore '.$backupKey);
  		$restoreService->setRestart(Service::RESTART_START_ONCE);
  
  		$mysqlVolume = $this->makeVolume($data);
  		$backupVolume = $this->makeBackupVolume($database);
  		$restoreService->addVolume( $mysqlVolume );
  		$restoreService->addVolume( $backupVolume );
  
  		/**
  		 * @var SchedulerParser $schedulerParser
  		 */
  		//$schedulerParser = container(SchedulerParser::class);
  		$schedulerParser = container('scheduler-parser');
  		$config = new ArrayConfiguration([
  			'scheduler' => [
  				'should-have-tags' => [ 'primary-restore' ]
  			]
  		]);
  		$schedulerParser->parse($restoreService, $config);
  
  
  		$restoreInfrastructure = new Infrastructure();
  		$restoreInfrastructure->addService($restoreService);
  
  		$this->infrastructureWriter->setPath( $this->getWorkDirectory() )
  			->setSkipClear(false)
  			->write($restoreInfrastructure, new FileWriter());
  		$output->writeln("Starting ".$restoreService->getName().".");
  		$this->rancherService->start( $this->getWorkDirectory(), $stackName);
  		$output->writeln("Waiting for ".$restoreService->getName()." to finish.");
  		$this->rancherService->wait($stackName, $restoreService->getName(), new HealthStateMatcher('started-once') );
  		$output->writeln($restoreService->getName()." finished.");
  
  		return $restoreService;
  	}
code: private function startRestoreService( StorageboxData $data, $backupKey, Database $database, OutputInterface $output) {
  		$stackName = $data->getBackup()->getStackName();
  
  		$restoreService = new Service();
  		$restoreService->setImage('ipunktbs/xtrabackup:1.1.1');
  		$restoreService->setName('restore-'.$backupKey);
  		$restoreService->setCommand('restore '.$backupKey);
  		$restoreService->setRestart(Service::RESTART_START_ONCE);
  
  		$mysqlVolume = $this->makeVolume($data);
  		$backupVolume = $this->makeBackupVolume($database);
  		$restoreService->addVolume( $mysqlVolume );
  		$restoreService->addVolume( $backupVolume );
  
  		/**
  		 * @var SchedulerParser $schedulerParser
  		 */
  		//$schedulerParser = container(SchedulerParser::class);
  		$schedulerParser = container('scheduler-parser');
  		$config = new ArrayConfiguration([
  			'scheduler' => [
  				'should-have-tags' => [ 'primary-restore' ]
  			]
  		]);
  		$schedulerParser->parse($restoreService, $config);
  
  
  		$restoreInfrastructure = new Infrastructure();
  		$restoreInfrastructure->addService($restoreService);
  
  		$this->infrastructureWriter->setPath( $this->getWorkDirectory() )
  			->setSkipClear(false)
  			->write($restoreInfrastructure, new FileWriter());
  		$output->writeln("Starting ".$restoreService->getName().".");
  		$this->rancherService->start( $this->getWorkDirectory(), $stackName);
  		$output->writeln("Waiting for ".$restoreService->getName()." to finish.");
  		$this->rancherService->wait($stackName, $restoreService->getName(), new HealthStateMatcher('started-once') );
  		$output->writeln($restoreService->getName()." finished.");
  
  		return $restoreService;
  	}
code_tokens: private function startRestoreService ( StorageboxData $ data , $ backupKey , Database $ database , OutputInterface $ output ) { $ stackName = $ data -> getBackup ( ) -> getStackName ( ) ; $ restoreService = new Service ( ) ; $ restoreService -> setImage ( 'ipunktbs/xtrabackup:1.1.1' ) ; $ restoreService -> setName ( 'restore-' . $ backupKey ) ; $ restoreService -> setCommand ( 'restore ' . $ backupKey ) ; $ restoreService -> setRestart ( Service :: RESTART_START_ONCE ) ; $ mysqlVolume = $ this -> makeVolume ( $ data ) ; $ backupVolume = $ this -> makeBackupVolume ( $ database ) ; $ restoreService -> addVolume ( $ mysqlVolume ) ; $ restoreService -> addVolume ( $ backupVolume ) ; /**
  		 * @var SchedulerParser $schedulerParser
  		 */ //$schedulerParser = container(SchedulerParser::class); $ schedulerParser = container ( 'scheduler-parser' ) ; $ config = new ArrayConfiguration ( [ 'scheduler' => [ 'should-have-tags' => [ 'primary-restore' ] ] ] ) ; $ schedulerParser -> parse ( $ restoreService , $ config ) ; $ restoreInfrastructure = new Infrastructure ( ) ; $ restoreInfrastructure -> addService ( $ restoreService ) ; $ this -> infrastructureWriter -> setPath ( $ this -> getWorkDirectory ( ) ) -> setSkipClear ( false ) -> write ( $ restoreInfrastructure , new FileWriter ( ) ) ; $ output -> writeln ( "Starting " . $ restoreService -> getName ( ) . "." ) ; $ this -> rancherService -> start ( $ this -> getWorkDirectory ( ) , $ stackName ) ; $ output -> writeln ( "Waiting for " . $ restoreService -> getName ( ) . " to finish." ) ; $ this -> rancherService -> wait ( $ stackName , $ restoreService -> getName ( ) , new HealthStateMatcher ( 'started-once' ) ) ; $ output -> writeln ( $ restoreService -> getName ( ) . " finished." ) ; return $ restoreService ; }
docstring: Start the restore service
  
  @param StorageboxData $data
  @param string $backupKey
  @param Database $database
  @param OutputInterface $output
  @return Service
docstring_tokens: Start the restore service