Background Tasks: Async background tasks fail silently if soap client return false
See https://mantis.ilias.de/view.php?id=42183
This PR ads a fallback to SyncTaskManager if the soap client returns false.
One thing that I discovered in projects with time consumer async. background tasks.
- It could be worth setting a response timeout of
0by calling$soap_client->setResponseTimeout(0);(in\ILIAS\BackgroundTasks\Implementation\TaskManager\AsyncTaskManager::run). - A
ignore_user_abort(true);could be set in\ilSoapBackgroundTasksAdministration::runAsync
As far as I can see, the SOAP call is "Fire & Forget" anyway.
This approach will ensure some of the false or Exception cases will not occur anymore and the client/caller (ILIAS itself) does not unnecessarily wait.
I reverted the fallback to sync execution if the soap call returns false. This is the case for time-consuming tasks and and would result in a double execution. The initial reason for this PR (failed call for root user due to missing acceptance of legal documents) is solved by https://github.com/ILIAS-eLearning/ILIAS/commit/38d246e153c2f13be49ac9c8ddc46b934d25e0b0.
Nevertheless, I think this PR is still useful regarding the change of the logger and the pre-check for activated SOAP.
Thanks a lot, I squashed to one commit and picked to other branches as well