Skip to content

Commit c29cf03

Browse files
committed
Base lockfile name of logfile name so all for child proceess to hold a separate lock
1 parent b056092 commit c29cf03

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

Helper/Locking/LockingEnhancement.php

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,14 @@ class LockingEnhancement extends AbstractEnhancement
2424
public function initialize(InputInterface $input, OutputInterface $output)
2525
{
2626
if ($this->getRuntimeConfig()->isLocking()) {
27-
$this->lockHandler = new LockHandler($this->getUserCommandClassFilename(), $this->getRuntimeConfig()->getLockFileFolder());
27+
28+
// If a custom logfile name has been provided, use this as the lockfile name
29+
$lockfileName = $this->getRuntimeConfig()->getLogFilename(false);
30+
if(is_null($lockfileName)){
31+
$lockfileName = $this->getUserCommandClassFilename();
32+
}
33+
34+
$this->lockHandler = new LockHandler($lockfileName , $this->getRuntimeConfig()->getLockFileFolder());
2835
if (!$this->lockHandler->lock()) {
2936
throw new LockAcquireException('Sorry, can\'t get the lock. Bailing out!');
3037
}

0 commit comments

Comments
 (0)