mirror of
https://github.com/shlinkio/shlink.git
synced 2025-01-23 23:13:26 -06:00
Reused ProcessVisitsCommand name as the lock name
This commit is contained in:
parent
1ceabf3bc3
commit
dd2cffeee9
@ -21,7 +21,6 @@ use function sprintf;
|
|||||||
class ProcessVisitsCommand extends Command
|
class ProcessVisitsCommand extends Command
|
||||||
{
|
{
|
||||||
public const NAME = 'visit:process';
|
public const NAME = 'visit:process';
|
||||||
private const LOCK_NAME = 'visit_process';
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var VisitServiceInterface
|
* @var VisitServiceInterface
|
||||||
@ -69,7 +68,7 @@ class ProcessVisitsCommand extends Command
|
|||||||
$this->output = $output;
|
$this->output = $output;
|
||||||
$io = new SymfonyStyle($input, $output);
|
$io = new SymfonyStyle($input, $output);
|
||||||
|
|
||||||
$lock = $this->locker->createLock(self::LOCK_NAME);
|
$lock = $this->locker->createLock(self::NAME);
|
||||||
if (! $lock->acquire()) {
|
if (! $lock->acquire()) {
|
||||||
$io->warning(sprintf(
|
$io->warning(sprintf(
|
||||||
$this->translator->translate('There is already an instance of the "%s" command in execution'),
|
$this->translator->translate('There is already an instance of the "%s" command in execution'),
|
||||||
|
Loading…
Reference in New Issue
Block a user