Skip to content

Commit

Permalink
feat(ZMS-1223): fix cron
Browse files Browse the repository at this point in the history
  • Loading branch information
manjencic authored Dec 4, 2023
1 parent 45862cd commit d95446f
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions zmsdb/src/Zmsdb/Helper/ArchivedDataIntoStatisticByCron.php
Original file line number Diff line number Diff line change
Expand Up @@ -88,8 +88,12 @@ protected function writeProcessInStatisticTable(
$commit = false
) {
$requestList = (new \BO\Zmsdb\Request())->readRequestByArchiveId($process->archiveId);
$requestList = ($requestList->count()) ? $requestList : [new \BO\Zmsentities\Request(['id' => '-1'])];
$processingTime = ($requestList->count() && $requestList->count() === 1) ? $process->bearbeitungszeit : null;
$processingTime = null;
if ($requestList->count()) {
$processingTime = $requestList->count() === 1 ? $process->bearbeitungszeit : null;
} else {
$requestList = [new \BO\Zmsentities\Request(['id' => '-1'])];
}

foreach ($requestList as $request) {
$archived = true; // for verbose
Expand Down

0 comments on commit d95446f

Please sign in to comment.