Merge pull request #22242 from nextcloud/techdebt/noid/remove-deprecated-methods
Remove deprecated and unused method calls
This commit is contained in:
commit
5559570faf
|
@ -106,16 +106,6 @@ trait FrontendDefinitionTrait {
|
|||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* @param string $custom
|
||||
* @return self
|
||||
* @deprecated 9.1.0, use addCustomJs() instead
|
||||
*/
|
||||
public function setCustomJs($custom) {
|
||||
$this->customJs = [$custom];
|
||||
return $this;
|
||||
}
|
||||
|
||||
/**
|
||||
* Serialize into JSON for client-side JS
|
||||
*
|
||||
|
|
|
@ -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
|
||||
*
|
||||
|
|
|
@ -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
|
||||
*
|
||||
|
|
|
@ -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
|
||||
*
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue