Magento 2 Documentation  2.3
Documentation for Magento 2 CMS v2.3 (December 2018)
Lock.php
Go to the documentation of this file.
1 <?php
8 
12 class Lock
13 {
17  private $lock;
18 
24  public function __construct(\Magento\Framework\MessageQueue\Lock\WriterInterface $lock)
25  {
26  $this->lock = $lock;
27  }
28 
36  public function afterSet(\Magento\Framework\App\MaintenanceMode $subject, $result)
37  {
38  if (!$subject->isOn() && $result) {
39  $this->lock->releaseOutdatedLocks();
40  }
41  }
42 }
__construct(\Magento\Framework\MessageQueue\Lock\WriterInterface $lock)
Definition: Lock.php:24
afterSet(\Magento\Framework\App\MaintenanceMode $subject, $result)
Definition: Lock.php:36