diff options
-rw-r--r-- | lib/private/App/AppManager.php | 1 | ||||
-rw-r--r-- | lib/private/legacy/OC_App.php | 7 |
2 files changed, 8 insertions, 0 deletions
diff --git a/lib/private/App/AppManager.php b/lib/private/App/AppManager.php index b6f7f9b13b7..0dd0d1f6b33 100644 --- a/lib/private/App/AppManager.php +++ b/lib/private/App/AppManager.php @@ -672,6 +672,7 @@ class AppManager implements IAppManager { $appData = $this->getAppInfo($appId); if (!is_null($appData)) { \OC_App::executeRepairSteps($appId, $appData['repair-steps']['uninstall']); + \OC_App::removeBackgroundJobs($appData['background-jobs']); } $this->dispatcher->dispatchTyped(new AppDisableEvent($appId)); diff --git a/lib/private/legacy/OC_App.php b/lib/private/legacy/OC_App.php index 544938b6ff9..78fd1e60844 100644 --- a/lib/private/legacy/OC_App.php +++ b/lib/private/legacy/OC_App.php @@ -755,6 +755,13 @@ class OC_App { $r->run(); } + public static function removeBackgroundJobs(array $jobs) { + $queue = \OC::$server->getJobList(); + foreach ($jobs as $job) { + $queue->remove($job); + } + } + public static function setupBackgroundJobs(array $jobs) { $queue = \OC::$server->getJobList(); foreach ($jobs as $job) { |