summaryrefslogtreecommitdiffstats
path: root/lib/private/Repair
diff options
context:
space:
mode:
authorRoeland Jago Douma <roeland@famdouma.nl>2018-05-08 14:47:50 +0200
committerRoeland Jago Douma <roeland@famdouma.nl>2018-05-14 13:25:55 +0200
commit253f962241ba7c96610f22e6940c31184650041d (patch)
tree4142059ceba15c6bf5748b8260285c9a11940f3e /lib/private/Repair
parent3bfa031f38ded2da90ce6051187fcbcb53f67cc2 (diff)
downloadnextcloud-server-253f962241ba7c96610f22e6940c31184650041d.tar.gz
nextcloud-server-253f962241ba7c96610f22e6940c31184650041d.zip
Add the job
Signed-off-by: Roeland Jago Douma <roeland@famdouma.nl>
Diffstat (limited to 'lib/private/Repair')
-rw-r--r--lib/private/Repair/NC14/AddPreviewBackgroundCleanupJob.php48
1 files changed, 48 insertions, 0 deletions
diff --git a/lib/private/Repair/NC14/AddPreviewBackgroundCleanupJob.php b/lib/private/Repair/NC14/AddPreviewBackgroundCleanupJob.php
new file mode 100644
index 00000000000..b58fabcba50
--- /dev/null
+++ b/lib/private/Repair/NC14/AddPreviewBackgroundCleanupJob.php
@@ -0,0 +1,48 @@
+<?php
+declare(strict_types=1);
+/**
+ * @copyright 2018, Roeland Jago Douma <roeland@famdouma.nl>
+ *
+ * @author Roeland Jago Douma <roeland@famdouma.nl>
+ *
+ * @license GNU AGPL version 3 or any later version
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU Affero General Public License as
+ * published by the Free Software Foundation, either version 3 of the
+ * License, or (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU Affero General Public License for more details.
+ *
+ * You should have received a copy of the GNU Affero General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ *
+ */
+namespace OC\Repair\NC14;
+
+use OC\Preview\BackgroundCleanupJob;
+use OCP\BackgroundJob\IJobList;
+use OCP\Migration\IOutput;
+use OCP\Migration\IRepairStep;
+
+class AddPreviewBackgroundCleanupJob implements IRepairStep {
+
+ /** @var IJobList */
+ private $jobList;
+
+ public function __construct(IJobList $jobList) {
+ $this->jobList = $jobList;
+ }
+
+ public function getName(): string {
+ return 'Add preview background cleanup job';
+ }
+
+ public function run(IOutput $output) {
+ $this->jobList->add(BackgroundCleanupJob::class);
+ }
+
+}