Skip to content

Commit

Permalink
Merge pull request #3 from aliozkan/master
Browse files Browse the repository at this point in the history
locker lockId added to exception message when lock failed.
  • Loading branch information
fustundag authored Jan 29, 2021
2 parents 8e5dbfc + 3fa8fa0 commit 1c5ff67
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
],
"require": {
"php": ">=7.1",
"ex-json": "*",
"mtdowling/cron-expression": "1.2.*@stable",
"psr/log":"1.0.*@stable"
},
Expand Down
4 changes: 2 additions & 2 deletions src/Daemon.php
Original file line number Diff line number Diff line change
Expand Up @@ -176,8 +176,8 @@ private function runJob()
$locked = $this->locker->lock($lockId);
if ($locked === false) {
throw new \RuntimeException(
'Cron #' . $cronId . ' lock failed! LockId: ' . $lockId
. ($this->isDeadLock($lockId) ? " ( Deadlock found! ) " : "")
'Cron #' . $cronId . ' lock failed! jobName: ' . $lockId
. ($this->isDeadLock($lockId) ? " ( Deadlock found! ) LockId: " . $this->locker->getJobUniqId($lockId) : "")
);
}
@exec($this->lastRunnedCronJob->getCmd(), $output, $retval);
Expand Down

0 comments on commit 1c5ff67

Please sign in to comment.