query instead of create Application in background jobs

stable17
Robin Appelman 2020-08-28 17:04:21 +02:00
rodzic 84d4ad5612
commit 0ce3da28d7
3 zmienionych plików z 3 dodań i 3 usunięć

Wyświetl plik

@ -76,7 +76,7 @@ class Cache extends TimedJob {
* @throws QueryException
*/
protected function run($argument) {
$app = new Application();
$app = \OC::$server->query(Application::class);
$c = $app->getContainer();
$this->accountService = $c->query(AccountService::class);

Wyświetl plik

@ -66,7 +66,7 @@ class Chunk extends TimedJob {
* @throws QueryException
*/
protected function run($argument) {
$app = new Application();
$app = \OC::$server->query(Application::class);
$c = $app->getContainer();
$this->configService = $c->query(ConfigService::class);

Wyświetl plik

@ -76,7 +76,7 @@ class Queue extends TimedJob {
* @throws QueryException
*/
protected function run($argument) {
$app = new Application();
$app = \OC::$server->query(Application::class);
$c = $app->getContainer();
$this->requestQueueService = $c->query(RequestQueueService::class);