Skip to content

Commit

Permalink
ProcessJobExecutor: improve subprocess fail message
Browse files Browse the repository at this point in the history
  • Loading branch information
mabar committed Jan 13, 2024
1 parent 5bd4e0c commit 70665b9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
1 change: 1 addition & 0 deletions src/Executor/ProcessJobExecutor.php
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ private function createSubprocessFail(Process $execution, string $output, string
$message = Message::create()
->withContext("Running job via command {$execution->getCommandLine()}")
->withProblem('Job subprocess failed.')
->with('Tip', 'Make sure that job is executable by the command and that you have the error handler set.')
->with('stdout', trim($output))
->with('stderr', $errorOutput);

Expand Down
4 changes: 4 additions & 0 deletions tests/Unit/SimpleSchedulerTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -994,6 +994,8 @@ public function testProcessExecutorWithDefaultExecutable(): void
<<<'MSG'
Context: Running job via command %a
Problem: Job subprocess failed.
Tip: Make sure that job is executable by the command and that you have the error
handler set.
stdout: Could not open input file: bin/console
stderr:
MSG,
Expand Down Expand Up @@ -1029,6 +1031,8 @@ public function testProcessStderr(): void
<<<'MSG'
Context: Running job via command %a
Problem: Job subprocess failed.
Tip: Make sure that job is executable by the command and that you have the error
handler set.
stdout:%c
stderr: error
MSG,
Expand Down

0 comments on commit 70665b9

Please sign in to comment.