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:
Christoph Wurst 2022-02-22 11:31:54 +01:00
parent a6bc871c96
commit ef4c18a266
No known key found for this signature in database
GPG key ID: CC42AC2A7F0E56D8
5 changed files with 13 additions and 0 deletions

View file

@ -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;

View file

@ -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'];

View file

@ -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 {

View file

@ -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 {
/**

View file

@ -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;