mirror of
https://github.com/nextcloud/server.git
synced 2026-06-14 19:20:35 -04:00
Deprecate our old, internal background job base classes
The OCP ones should be used instead. This makes it more visible in our IDEs that the base class of background job should be replaced. Signed-off-by: Christoph Wurst <christoph@winzerhof-wurst.at>
This commit is contained in:
parent
a6bc871c96
commit
ef4c18a266
5 changed files with 13 additions and 0 deletions
|
|
@ -29,6 +29,9 @@ use OCP\BackgroundJob\IJob;
|
|||
use OCP\BackgroundJob\IJobList;
|
||||
use OCP\ILogger;
|
||||
|
||||
/**
|
||||
* @deprecated internal class, use \OCP\BackgroundJob\Job
|
||||
*/
|
||||
abstract class Job implements IJob {
|
||||
/** @var int */
|
||||
protected $id;
|
||||
|
|
|
|||
|
|
@ -23,6 +23,9 @@
|
|||
*/
|
||||
namespace OC\BackgroundJob\Legacy;
|
||||
|
||||
/**
|
||||
* @deprecated internal class, use \OCP\BackgroundJob\QueuedJob
|
||||
*/
|
||||
class QueuedJob extends \OC\BackgroundJob\QueuedJob {
|
||||
public function run($argument) {
|
||||
$class = $argument['klass'];
|
||||
|
|
|
|||
|
|
@ -24,6 +24,9 @@ namespace OC\BackgroundJob\Legacy;
|
|||
|
||||
use OCP\AutoloadNotAllowedException;
|
||||
|
||||
/**
|
||||
* @deprecated internal class, use \OCP\BackgroundJob\QueuedJob
|
||||
*/
|
||||
class RegularJob extends \OC\BackgroundJob\Job {
|
||||
public function run($argument) {
|
||||
try {
|
||||
|
|
|
|||
|
|
@ -32,6 +32,8 @@ use OCP\ILogger;
|
|||
* create a background job that is to be executed once
|
||||
*
|
||||
* @package OC\BackgroundJob
|
||||
*
|
||||
* @deprecated internal class, use \OCP\BackgroundJob\QueuedJob
|
||||
*/
|
||||
abstract class QueuedJob extends Job {
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -34,6 +34,8 @@ use OCP\ILogger;
|
|||
* create a background job that is to be executed at an interval
|
||||
*
|
||||
* @package OC\BackgroundJob
|
||||
*
|
||||
* @deprecated internal class, use \OCP\BackgroundJob\TimedJob
|
||||
*/
|
||||
abstract class TimedJob extends Job {
|
||||
protected $interval = 0;
|
||||
|
|
|
|||
Loading…
Reference in a new issue