mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-10 17:23:12 +08:00
Added status codes returned by CLI commands
This commit is contained in:
@@ -48,7 +48,7 @@ class ProcessVisitsCommand extends Command
|
||||
->setDescription('Processes visits where location is not set yet');
|
||||
}
|
||||
|
||||
protected function execute(InputInterface $input, OutputInterface $output): void
|
||||
protected function execute(InputInterface $input, OutputInterface $output): ?int
|
||||
{
|
||||
$this->output = $output;
|
||||
$io = new SymfonyStyle($input, $output);
|
||||
@@ -56,7 +56,7 @@ class ProcessVisitsCommand extends Command
|
||||
$lock = $this->locker->createLock(self::NAME);
|
||||
if (! $lock->acquire()) {
|
||||
$io->warning(sprintf('There is already an instance of the "%s" command in execution', self::NAME));
|
||||
return;
|
||||
return 1;
|
||||
}
|
||||
|
||||
try {
|
||||
@@ -70,6 +70,7 @@ class ProcessVisitsCommand extends Command
|
||||
$io->success('Finished processing all IPs');
|
||||
} finally {
|
||||
$lock->release();
|
||||
return 0;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user