[Pkg-owncloud-commits] [owncloud] 41/122: Fix DeleteOrphanedSharesJob

David Prévot taffit at moszumanska.debian.org
Sat May 9 00:00:09 UTC 2015


This is an automated email from the git hooks/post-receive script.

taffit pushed a commit to branch stable8
in repository owncloud.

commit 760ce3bd6326d1c5d804bf0eba93f20de5e68e98
Author: Morris Jobke <hey at morrisjobke.de>
Date:   Mon May 4 13:58:58 2015 +0200

    Fix DeleteOrphanedSharesJob
    
    * remove unneeded use statements
    * the the interval properly in the constructor
    * set the log level to debug (from info) - fixes #16036
---
 apps/files_sharing/lib/deleteorphanedsharesjob.php | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/apps/files_sharing/lib/deleteorphanedsharesjob.php b/apps/files_sharing/lib/deleteorphanedsharesjob.php
index f39078b..0654c82 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']);
 	}
 
 }

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-owncloud/owncloud.git



More information about the Pkg-owncloud-commits mailing list