Skip to content

Commit

Permalink
Merge pull request #72 from it-at-m/bugfix-1710-fix-dead-lock
Browse files Browse the repository at this point in the history
fix(ZMS-1710): fix deadlock
  • Loading branch information
manjencic authored Dec 18, 2023
2 parents 146904b + 9913b3c commit 593b906
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions zmsdb/src/Zmsdb/Connection/Select.php
Original file line number Diff line number Diff line change
Expand Up @@ -323,4 +323,9 @@ public static function writeCommit()
}
return null;
}

public static function writeCommitWithStartLock()
{
return self::writeCommit() && (new \BO\Zmsdb\Config)->readProperty('status__calculateSlotsLastRun', true);
}
}
2 changes: 1 addition & 1 deletion zmsdb/src/Zmsdb/Helper/CalculateSlots.php
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ protected function writeCalculatedScope(\BO\Zmsentities\Scope $scope, \DateTimeI
}
if (count($updatedList)) {
$this->writePostProcessingByScope($scope, $now);
\BO\Zmsdb\Connection\Select::writeCommit();
\BO\Zmsdb\Connection\Select::writeCommitWithStartLock();
$this->readLastRun();
return true;
}
Expand Down

0 comments on commit 593b906

Please sign in to comment.