diff --git a/zmsdb/src/Zmsdb/Connection/Select.php b/zmsdb/src/Zmsdb/Connection/Select.php index 35d931e4f..a494b5397 100644 --- a/zmsdb/src/Zmsdb/Connection/Select.php +++ b/zmsdb/src/Zmsdb/Connection/Select.php @@ -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); + } } diff --git a/zmsdb/src/Zmsdb/Helper/CalculateSlots.php b/zmsdb/src/Zmsdb/Helper/CalculateSlots.php index d257cd5e2..582d297c5 100644 --- a/zmsdb/src/Zmsdb/Helper/CalculateSlots.php +++ b/zmsdb/src/Zmsdb/Helper/CalculateSlots.php @@ -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; }