Let DI handle the background job

Fixes #7548

Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
This commit is contained in:
Roeland Jago Douma 2017-12-18 20:40:54 +01:00
parent cb5433062f
commit 0b7136940e
No known key found for this signature in database
GPG key ID: F941078878347C0C

View file

@ -1093,16 +1093,6 @@ class Server extends ServerContainer implements IServerContainer {
return new CloudIdManager();
});
/* To trick DI since we don't extend the DIContainer here */
$this->registerService(CleanPreviewsBackgroundJob::class, function (Server $c) {
return new CleanPreviewsBackgroundJob(
$c->getRootFolder(),
$c->getLogger(),
$c->getJobList(),
new TimeFactory()
);
});
$this->registerAlias(\OCP\AppFramework\Utility\IControllerMethodReflector::class, \OC\AppFramework\Utility\ControllerMethodReflector::class);
$this->registerAlias('ControllerMethodReflector', \OCP\AppFramework\Utility\IControllerMethodReflector::class);