From 103c6fb39eab36063b16767abb33da0395b2b9c8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julius=20H=C3=A4rtl?= Date: Wed, 6 Nov 2019 10:41:08 +0100 Subject: [PATCH] Add background job for token cleanup MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Julius Härtl --- apps/files/appinfo/info.xml | 1 + .../CleanupDirectEditingTokens.php | 31 +++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 apps/files/lib/BackgroundJob/CleanupDirectEditingTokens.php diff --git a/apps/files/appinfo/info.xml b/apps/files/appinfo/info.xml index d8c61d0f456..67c589ed755 100644 --- a/apps/files/appinfo/info.xml +++ b/apps/files/appinfo/info.xml @@ -26,6 +26,7 @@ OCA\Files\BackgroundJob\ScanFiles OCA\Files\BackgroundJob\DeleteOrphanedItems OCA\Files\BackgroundJob\CleanupFileLocks + OCA\Files\BackgroundJob\CleanupDirectEditingTokens diff --git a/apps/files/lib/BackgroundJob/CleanupDirectEditingTokens.php b/apps/files/lib/BackgroundJob/CleanupDirectEditingTokens.php new file mode 100644 index 00000000000..77907fab281 --- /dev/null +++ b/apps/files/lib/BackgroundJob/CleanupDirectEditingTokens.php @@ -0,0 +1,31 @@ +interval = self::INTERVAL_MINUTES; + $this->manager = $manager; + } + + /** + * Makes the background job do its work + * + * @param array $argument unused argument + * @throws \Exception + */ + public function run($argument) { + $this->manager->cleanup(); + } +}