mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-23 09:53:15 +00:00
change default nbr process to 1, and remove unused code
This commit is contained in:
@@ -23,9 +23,9 @@ class WorkerExecuteCommand extends Command
|
|||||||
$this->setDescription('Listen queues define on configuration, launch corresponding service for execution')
|
$this->setDescription('Listen queues define on configuration, launch corresponding service for execution')
|
||||||
->addOption('preserve-payload', 'p', InputOption::VALUE_NONE, 'Preserve temporary payload file')
|
->addOption('preserve-payload', 'p', InputOption::VALUE_NONE, 'Preserve temporary payload file')
|
||||||
->addOption('queue-name', '', InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'The name of queues to be consuming')
|
->addOption('queue-name', '', InputOption::VALUE_REQUIRED | InputOption::VALUE_IS_ARRAY, 'The name of queues to be consuming')
|
||||||
->addOption('max-processes', 'm', InputOption::VALUE_REQUIRED, 'The max number of process allow to run (default 4) ')
|
->addOption('max-processes', 'm', InputOption::VALUE_REQUIRED, 'The max number of process allow to run (default 1) ')
|
||||||
->addOption('MWG', '', InputOption::VALUE_NONE, 'Enable MWG metadata compatibility (use only for write metadata service)')
|
// ->addOption('MWG', '', InputOption::VALUE_NONE, 'Enable MWG metadata compatibility (use only for write metadata service)')
|
||||||
->addOption('clear-metadatas', '', InputOption::VALUE_NONE, 'Delete metadatas from documents if not compliant with Database structure (use only for write metadata service)')
|
// ->addOption('clear-metadatas', '', InputOption::VALUE_NONE, 'Remove metadatas from documents if not compliant with Database structure (use only for write metadata service)')
|
||||||
->setHelp('');
|
->setHelp('');
|
||||||
|
|
||||||
return $this;
|
return $this;
|
||||||
@@ -33,9 +33,6 @@ class WorkerExecuteCommand extends Command
|
|||||||
|
|
||||||
protected function doExecute(InputInterface $input, OutputInterface $output)
|
protected function doExecute(InputInterface $input, OutputInterface $output)
|
||||||
{
|
{
|
||||||
$MWG = false;
|
|
||||||
$clearMetadatas = false;
|
|
||||||
|
|
||||||
$argQueueName = $input->getOption('queue-name');
|
$argQueueName = $input->getOption('queue-name');
|
||||||
$maxProcesses = intval($input->getOption('max-processes'));
|
$maxProcesses = intval($input->getOption('max-processes'));
|
||||||
|
|
||||||
@@ -64,14 +61,6 @@ class WorkerExecuteCommand extends Command
|
|||||||
$workerInvoker->setMaxProcessPoolValue($maxProcesses);
|
$workerInvoker->setMaxProcessPoolValue($maxProcesses);
|
||||||
}
|
}
|
||||||
|
|
||||||
if ($input->getOption('MWG')) {
|
|
||||||
$MWG = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($input->getOption('clear-metadatas')) {
|
|
||||||
$clearMetadatas = true;
|
|
||||||
}
|
|
||||||
|
|
||||||
if ($input->getOption('preserve-payload')) {
|
if ($input->getOption('preserve-payload')) {
|
||||||
$workerInvoker->preservePayloads();
|
$workerInvoker->preservePayloads();
|
||||||
}
|
}
|
||||||
|
@@ -10,7 +10,7 @@ use Symfony\Component\Process\ProcessBuilder;
|
|||||||
|
|
||||||
class ProcessPool implements LoggerAwareInterface
|
class ProcessPool implements LoggerAwareInterface
|
||||||
{
|
{
|
||||||
const MAX_PROCESSES = 4;
|
const MAX_PROCESSES = 1;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @var int
|
* @var int
|
||||||
@@ -41,7 +41,7 @@ class ProcessPool implements LoggerAwareInterface
|
|||||||
* Sets a logger instance on the object
|
* Sets a logger instance on the object
|
||||||
*
|
*
|
||||||
* @param LoggerInterface $logger
|
* @param LoggerInterface $logger
|
||||||
* @return null
|
* @return void
|
||||||
*/
|
*/
|
||||||
public function setLogger(LoggerInterface $logger)
|
public function setLogger(LoggerInterface $logger)
|
||||||
{
|
{
|
||||||
|
Reference in New Issue
Block a user