Forráskód Böngészése

Capture error messages in exec command

Abdullah Almsaeed 8 éve
szülő
commit
3cafe940df
1 módosított fájl, 2 hozzáadás és 2 törlés
  1. 2 2
      tripal_core/api/tripal_core.jobs.api.inc

+ 2 - 2
tripal_core/api/tripal_core.jobs.api.inc

@@ -295,11 +295,11 @@ function tripal_execute_job($job_id, $redirect = TRUE) {
 
   // set the end time for this job
   if ($job->end_time == 0) {
-    $cmd = "whoami; drush trp-run-jobs --job_id=".escapeshellarg($job_id)." --username=".escapeshellarg($user->name)." --root=".DRUPAL_ROOT." 2>&1";
+    $cmd = "drush trp-run-jobs --job_id=".escapeshellarg($job_id)." --username=".escapeshellarg($user->name)." --root=".DRUPAL_ROOT." 2>&1";
     exec($cmd, $output, $return_code);
     $response = 'Response <br>';
     foreach($output as $line) {
-      $response .= $line."<br>";
+      $response .= $line." ";
     }
     drupal_set_message($cmd.'<br>'.$response."<br> exit code = $return_code");
   }