aboutsummaryrefslogtreecommitdiffstats
path: root/lib/private/backgroundjob
diff options
context:
space:
mode:
authorMorris Jobke <hey@morrisjobke.de>2015-04-30 11:52:30 +0200
committerMorris Jobke <hey@morrisjobke.de>2015-04-30 11:52:30 +0200
commitfbba7a61cb00229128c722cef8d0248b04d00299 (patch)
tree7d22505e87d933478e1ce48bf41c672fa728535f /lib/private/backgroundjob
parentae853445ef258b960174171bd9624986de33e24d (diff)
downloadnextcloud-server-fbba7a61cb00229128c722cef8d0248b04d00299.tar.gz
nextcloud-server-fbba7a61cb00229128c722cef8d0248b04d00299.zip
Use internally \OCP\ILogger instead of \OC\Log
* this is the preparation for some upcoming logger related changes * also fixes an issue in the public interface where we request an internal class as parameter
Diffstat (limited to 'lib/private/backgroundjob')
-rw-r--r--lib/private/backgroundjob/job.php5
-rw-r--r--lib/private/backgroundjob/queuedjob.php5
-rw-r--r--lib/private/backgroundjob/timedjob.php5
3 files changed, 9 insertions, 6 deletions
diff --git a/lib/private/backgroundjob/job.php b/lib/private/backgroundjob/job.php
index 068d1da0ae3..88682cd09bb 100644
--- a/lib/private/backgroundjob/job.php
+++ b/lib/private/backgroundjob/job.php
@@ -24,6 +24,7 @@
namespace OC\BackgroundJob;
use OCP\BackgroundJob\IJob;
+use OCP\ILogger;
abstract class Job implements IJob {
/**
@@ -43,9 +44,9 @@ abstract class Job implements IJob {
/**
* @param JobList $jobList
- * @param \OC\Log $logger
+ * @param ILogger $logger
*/
- public function execute($jobList, $logger = null) {
+ public function execute($jobList, ILogger $logger = null) {
$jobList->setLastRun($this);
try {
$this->run($this->argument);
diff --git a/lib/private/backgroundjob/queuedjob.php b/lib/private/backgroundjob/queuedjob.php
index 21ee03f478d..c4cf8b0e5e0 100644
--- a/lib/private/backgroundjob/queuedjob.php
+++ b/lib/private/backgroundjob/queuedjob.php
@@ -21,6 +21,7 @@
*/
namespace OC\BackgroundJob;
+use OCP\ILogger;
/**
* Class QueuedJob
@@ -34,9 +35,9 @@ abstract class QueuedJob extends Job {
* run the job, then remove it from the joblist
*
* @param JobList $jobList
- * @param \OC\Log $logger
+ * @param ILogger $logger
*/
- public function execute($jobList, $logger = null) {
+ public function execute($jobList, ILogger $logger = null) {
$jobList->remove($this, $this->argument);
parent::execute($jobList, $logger);
}
diff --git a/lib/private/backgroundjob/timedjob.php b/lib/private/backgroundjob/timedjob.php
index 3b896bd4cc7..63db1fed61c 100644
--- a/lib/private/backgroundjob/timedjob.php
+++ b/lib/private/backgroundjob/timedjob.php
@@ -21,6 +21,7 @@
*/
namespace OC\BackgroundJob;
+use OCP\ILogger;
/**
* Class QueuedJob
@@ -45,9 +46,9 @@ abstract class TimedJob extends Job {
* run the job if
*
* @param JobList $jobList
- * @param \OC\Log $logger
+ * @param ILogger $logger
*/
- public function execute($jobList, $logger = null) {
+ public function execute($jobList, ILogger $logger = null) {
if ((time() - $this->lastRun) > $this->interval) {
parent::execute($jobList, $logger);
}