]> source.dussan.org Git - nextcloud-server.git/commitdiff
Remove getLastJob from IJobList 22242/head
authorMorris Jobke <hey@morrisjobke.de>
Thu, 13 Aug 2020 19:50:06 +0000 (21:50 +0200)
committerMorris Jobke <hey@morrisjobke.de>
Thu, 13 Aug 2020 19:50:06 +0000 (21:50 +0200)
Signed-off-by: Morris Jobke <hey@morrisjobke.de>
lib/private/BackgroundJob/JobList.php
lib/public/BackgroundJob/IJobList.php
tests/lib/BackgroundJob/DummyJobList.php
tests/lib/BackgroundJob/JobListTest.php

index 1adecb5b32dc5dcdc18c58109aae77b61e18206f..d9d80374cfdd7d68ef5c298039bb4d64dcf9e158 100644 (file)
@@ -310,18 +310,6 @@ class JobList implements IJobList {
                $query->execute();
        }
 
-       /**
-        * get the id of the last ran job
-        *
-        * @return int
-        * @deprecated 9.1.0 - The functionality behind the value is deprecated, it
-        *    only tells you which job finished last, but since we now allow multiple
-        *    executors to run in parallel, it's not used to calculate the next job.
-        */
-       public function getLastJob() {
-               return (int) $this->config->getAppValue('backgroundjob', 'lastjob', 0);
-       }
-
        /**
         * set the lastRun of $job to now
         *
index cf04cb21f4823d9d4504e8d24d3128279e24b5ef..eb8a2c5e3dcde7918df39868baebe3e51baa55d4 100644 (file)
@@ -115,17 +115,6 @@ interface IJobList {
         */
        public function unlockJob(IJob $job);
 
-       /**
-        * get the id of the last ran job
-        *
-        * @return int
-        * @since 7.0.0
-        * @deprecated 9.1.0 - The functionality behind the value is deprecated, it
-        *    only tells you which job finished last, but since we now allow multiple
-        *    executors to run in parallel, it's not used to calculate the next job.
-        */
-       public function getLastJob();
-
        /**
         * set the lastRun of $job to now
         *
index 529e93e960fe69141da8f1f5a7aad741e102576e..452b9bb98edb080da7d31fddeb9ddad26f78978c 100644 (file)
@@ -117,15 +117,6 @@ class DummyJobList extends \OC\BackgroundJob\JobList {
                return null;
        }
 
-       /**
-        * get the id of the last ran job
-        *
-        * @return int
-        */
-       public function getLastJob() {
-               return $this->last;
-       }
-
        /**
         * set the lastRun of $job to now
         *
index 20ba1e50016076f82029324d25bbf223d433a425..736d670ed20fec8c5878dd2c83c34c555ba8fe4d 100644 (file)
@@ -146,15 +146,6 @@ class JobListTest extends TestCase {
                $this->assertFalse($this->instance->has($job, 10));
        }
 
-       public function testGetLastJob() {
-               $this->config->expects($this->once())
-                       ->method('getAppValue')
-                       ->with('backgroundjob', 'lastjob', 0)
-                       ->willReturn(15);
-
-               $this->assertEquals(15, $this->instance->getLastJob());
-       }
-
        protected function createTempJob($class, $argument, $reservedTime = 0, $lastChecked = 0) {
                if ($lastChecked === 0) {
                        $lastChecked = time();