Esempio n. 1
0
 /**
  * @param ParaunitProcessInterface[] $runningStack
  * @param ParaunitProcessInterface $launchedProcess
  */
 public static function printDebugOutput(ParaunitProcessInterface $launchedProcess, array $runningStack)
 {
     echo "\n New running stack:";
     echo "\n STARTED :" . $launchedProcess->getCommandLine();
     echo "\n --------";
     foreach ($runningStack as $processRunning) {
         echo "\n";
         echo str_replace('2>&1', '', $processRunning->getCommandLine());
     }
     echo "\n FINISHED: ";
 }
Esempio n. 2
0
 /**
  * @param ParaunitProcessInterface $process
  * @return array | \stdClass[]
  */
 public function fetch(ParaunitProcessInterface $process)
 {
     $filePath = $this->fileName->getFilenameForLog($process->getUniqueId());
     $fileContent = '';
     if (file_exists($filePath)) {
         $fileContent = file_get_contents($filePath);
         unlink($filePath);
     }
     $logs = json_decode($this->cleanLog($fileContent));
     $logs[] = $this->createLogEnding();
     return $logs;
 }