PHRAS-198 #fix add possibility to disable taskmanager per instance

This commit is contained in:
Nicolas Le Goff
2014-07-25 18:40:00 +02:00
parent b4141f92a7
commit 76cb4fad28
8 changed files with 56 additions and 7 deletions

View File

@@ -73,6 +73,10 @@ class module_console_taskrun extends Command
return self::EXITCODE_SETUP_ERROR;
}
if ($this->container['phraseanet.registry"].get("GV_disable_task_manager']) {
throw new RuntimeException('The use of the task manager is disabled on this instance.');
}
$task_id = (int) $input->getArgument('task_id');
if ($task_id <= 0 || strlen($task_id) !== strlen($input->getArgument('task_id'))) {
throw new \RuntimeException('Argument must be an Id.');