diff --git a/app/code/Magento/Deploy/Process/Queue.php b/app/code/Magento/Deploy/Process/Queue.php index 35d85c390b9c4..e7429af416a51 100644 --- a/app/code/Magento/Deploy/Process/Queue.php +++ b/app/code/Magento/Deploy/Process/Queue.php @@ -1,7 +1,7 @@ isDeployed($package) && ($this->maxProcesses < 2 || (count($this->inProgress) < $this->maxProcesses)) ) { + //Prevents duplicate execution of a theme package by checking if it has already been scheduled. + if (!isset($packages[$name])) { + $this->logger->debug(sprintf( + 'Preventing duplicate execution of package as it is in progress: %s (pid: %s)', + $package->getPath(), + $this->getPid($package) + )); + return; + } unset($packages[$name]); $this->execute($package); }