summaryrefslogtreecommitdiffstats
path: root/apps
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-05-04 13:58:58 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-05-04 13:58:58 +0200
commit760ce3bd6326d1c5d804bf0eba93f20de5e68e98 (patch)
treea0ce187d269bc57c48b6bddc9f2a57bc8959ac84 /apps
parent17fedc80dac7acd3d85f1f132455e94d4fd920c6 (diff)
downloadnextcloud-server-760ce3bd6326d1c5d804bf0eba93f20de5e68e98.tar.gz
nextcloud-server-760ce3bd6326d1c5d804bf0eba93f20de5e68e98.zip
Fix DeleteOrphanedSharesJob
* remove unneeded use statements * the the interval properly in the constructor * set the log level to debug (from info) - fixes #16036
Diffstat (limited to 'apps')
-rw-r--r--apps/files_sharing/lib/deleteorphanedsharesjob.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/apps/files_sharing/lib/deleteorphanedsharesjob.php b/apps/files_sharing/lib/deleteorphanedsharesjob.php
index f39078b778f..0654c82dd94 100644
--- a/apps/files_sharing/lib/deleteorphanedsharesjob.php
+++ b/apps/files_sharing/lib/deleteorphanedsharesjob.php
@@ -22,8 +22,6 @@
namespace OCA\Files_sharing\Lib;
-use Doctrine\DBAL\Platforms\SqlitePlatform;
-use OCP\IDBConnection;
use OC\BackgroundJob\TimedJob;
/**
@@ -39,6 +37,13 @@ class DeleteOrphanedSharesJob extends TimedJob {
protected $defaultIntervalMin = 15;
/**
+ * sets the correct interval for this timed job
+ */
+ public function __construct(){
+ $this->interval = $this->defaultIntervalMin * 60;
+ }
+
+ /**
* Makes the background job do its work
*
* @param array $argument unused argument
@@ -53,7 +58,7 @@ class DeleteOrphanedSharesJob extends TimedJob {
'AND NOT EXISTS (SELECT `fileid` FROM `*PREFIX*filecache` WHERE `file_source` = `fileid`)';
$deletedEntries = $connection->executeUpdate($sql);
- $logger->info("$deletedEntries orphaned share(s) deleted", ['app' => 'DeleteOrphanedSharesJob']);
+ $logger->debug("$deletedEntries orphaned share(s) deleted", ['app' => 'DeleteOrphanedSharesJob']);
}
}