Skip to content

Commit

Permalink
only log if theres something to log (#353)
Browse files Browse the repository at this point in the history
  • Loading branch information
andrewandante authored Jan 17, 2022
1 parent 6db21e3 commit b6be02c
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/Services/QueuedJobService.php
Original file line number Diff line number Diff line change
Expand Up @@ -899,7 +899,9 @@ public function runJob($jobId)
if (!$broken) {
// Collect output where jobs aren't using the logger singleton
ob_start(function ($buffer, $phase) use ($job, $jobDescriptor) {
$job->addMessage($buffer);
if (!empty($buffer)) {
$job->addMessage($buffer);
}
if ($jobDescriptor) {
$this->copyJobToDescriptor($job, $jobDescriptor);
$jobDescriptor->write();
Expand Down

0 comments on commit b6be02c

Please sign in to comment.