Skip to content

Commit

Permalink
Merge pull request #63 from WeareJH/add-success-return-to-all-cli-com…
Browse files Browse the repository at this point in the history
…mands

Add success return to all cli commands
  • Loading branch information
JamelleG authored Aug 2, 2023
2 parents 48fb6f5 + 2c98104 commit 2a55478
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/Command/ClearLastImportLogCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Jh\Import\Config\Data;
use Jh\Import\Entity\ImportHistoryResource;
use Magento\Framework\App\ResourceConnection;
use Magento\Framework\Console\Cli;
use Magento\Framework\DB\Adapter\AdapterInterface;
use Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory;
use Symfony\Component\Console\Command\Command;
Expand Down Expand Up @@ -84,5 +85,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
$importName
)
);

return Cli::RETURN_SUCCESS;
}
}
3 changes: 3 additions & 0 deletions src/Command/ListImportsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
use Jh\Import\Config\Data;
use Jh\Import\Locker\Locker;
use Magento\Cron\Model\Config;
use Magento\Framework\Console\Cli;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Helper\Table;
use Symfony\Component\Console\Input\InputArgument;
Expand Down Expand Up @@ -78,5 +79,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
->render();

$output->writeln('');

return Cli::RETURN_SUCCESS;
}
}
3 changes: 3 additions & 0 deletions src/Command/UnlockImportCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Jh\Import\Config\Data;
use Jh\Import\Locker\Locker;
use Magento\Framework\Console\Cli;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Input\InputArgument;
use Symfony\Component\Console\Input\InputInterface;
Expand Down Expand Up @@ -54,5 +55,7 @@ protected function execute(InputInterface $input, OutputInterface $output)

$this->locker->release($importName);
$output->writeln(sprintf('<info>The lock for import: "%s" has been released</info>', $importName));

return Cli::RETURN_SUCCESS;
}
}
3 changes: 3 additions & 0 deletions src/Command/ViewLocksCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@

use Jh\Import\Config\Data;
use Jh\Import\Locker\Locker;
use Magento\Framework\Console\Cli;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Helper\Table;
use Symfony\Component\Console\Input\InputInterface;
Expand Down Expand Up @@ -63,5 +64,7 @@ function (string $importName) {
->render();

$output->writeln('');

return Cli::RETURN_SUCCESS;
}
}
3 changes: 3 additions & 0 deletions src/Command/ViewLogsCommand.php
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
namespace Jh\Import\Command;

use Jh\Import\Config\Data;
use Magento\Framework\Console\Cli;
use Magento\Framework\View\Element\UiComponent\DataProvider\CollectionFactory;
use Symfony\Component\Console\Command\Command;
use Symfony\Component\Console\Helper\Table;
Expand Down Expand Up @@ -122,5 +123,7 @@ protected function execute(InputInterface $input, OutputInterface $output)
];
}, $itemLogCollection->getItems()))
->render();

return Cli::RETURN_SUCCESS;
}
}

0 comments on commit 2a55478

Please sign in to comment.