mirror of
https://github.com/nextcloud/server.git
synced 2026-06-10 09:13:19 -04:00
chore: Inline OC_App::setupBackgroundJobs
Signed-off-by: Côme Chilliet <come.chilliet@nextcloud.com>
This commit is contained in:
parent
e5606d7fe3
commit
0e01bc09a9
3 changed files with 13 additions and 2 deletions
|
|
@ -1055,7 +1055,10 @@ class AppManager implements IAppManager {
|
|||
$this->clearAppsCache();
|
||||
$this->getAppVersion($appId, false);
|
||||
|
||||
\OC_App::setupBackgroundJobs($appData['background-jobs']);
|
||||
// Setup background jobs
|
||||
foreach ($appData['background-jobs'] as $job) {
|
||||
$queue->add($job);
|
||||
}
|
||||
|
||||
//set remote/public handlers
|
||||
foreach ($appData['remote'] as $name => $path) {
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ use OC\Files\FilenameValidator;
|
|||
use OC_App;
|
||||
use OCP\App\AppPathNotFoundException;
|
||||
use OCP\App\IAppManager;
|
||||
use OCP\BackgroundJob\IJobList;
|
||||
use OCP\Files;
|
||||
use OCP\HintException;
|
||||
use OCP\Http\Client\IClientService;
|
||||
|
|
@ -552,7 +553,11 @@ class Installer {
|
|||
$output->debug('Registering tasks of ' . $info['id']);
|
||||
}
|
||||
|
||||
\OC_App::setupBackgroundJobs($info['background-jobs']);
|
||||
// Setup background jobs
|
||||
$queue = Server::get(IJobList::class);
|
||||
foreach ($info['background-jobs'] as $job) {
|
||||
$queue->add($job);
|
||||
}
|
||||
|
||||
// Run appinfo/install.php
|
||||
self::includeAppScript($appPath . '/appinfo/install.php');
|
||||
|
|
|
|||
|
|
@ -575,6 +575,9 @@ class OC_App {
|
|||
$r->run();
|
||||
}
|
||||
|
||||
/**
|
||||
* @deprecated 32.0.0 Use the IJobList directly instead
|
||||
*/
|
||||
public static function setupBackgroundJobs(array $jobs) {
|
||||
$queue = \OC::$server->getJobList();
|
||||
foreach ($jobs as $job) {
|
||||
|
|
|
|||
Loading…
Reference in a new issue