Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aynsix committed Dec 19, 2023
1 parent ca99090 commit 61cf828
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ public function infoAction(PhraseaApplication $app, Request $request)
$workerRunningJobTotalCount = $repoWorker->getJobCount($filterStatus, $jobType, $databoxId, $recordId, $fieldTimeFilter, $dateTimeFilter);
$workerRunningJobTotalCount = number_format($workerRunningJobTotalCount, 0, '.', ' ');
$totalDuration = array_sum(array_column($workerRunningJob, 'duration'));
$averageDuration = $totalDuration/count($workerRunningJob);

$averageDuration = (count($workerRunningJob) == 0) ? 0 : $totalDuration/count($workerRunningJob);

// format duration
$averageDuration = $helpers->getDuration($averageDuration);
Expand Down

0 comments on commit 61cf828

Please sign in to comment.