33 return hash(
"sha256", self::class);
38 return "Fill ini with settings for Services/BackgroundTasks";
56 public function achieve(Setup\
Environment $environment): Setup\Environment
58 $ini = $environment->getResource(Setup\Environment::RESOURCE_ILIAS_INI);
60 if (!
$ini->groupExists(
"background_tasks")) {
61 $ini->addGroup(
"background_tasks");
65 $io = $environment->getResource(Setup\Environment::RESOURCE_ADMIN_INTERACTION);
67 $io->inform(
'Asynchronous background tasks need SOAP administration to be enabled. Make sure to enable it in your configuarion.');
70 $ini->setVariable(
"background_tasks",
"concurrency", $this->config->getType());
71 $ini->setVariable(
"background_tasks",
"number_of_concurrent_tasks", $this->config->getMaxCurrentTasks());
74 throw new Setup\UnachievableException(
"Could not write ilias.ini.php");
85 $ini = $environment->getResource(Setup\Environment::RESOURCE_ILIAS_INI);
88 !
$ini->groupExists(
"background_tasks") ||
89 $ini->readVariable(
"background_tasks",
"concurrency") !== $this->config->getType() ||
90 $ini->readVariable(
"background_tasks",
"number_of_concurrent_tasks") !== $this->config->getMaxCurrentTasks()
isApplicable(Setup\Environment $environment)
__construct(\ilBackgroundTasksSetupConfig $config)
ilBackgroundTasksSetupConfig $config
getPreconditions(Setup\Environment $environment)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
An environment holds resources to be used in the setup process.