JobList

class OC\BackgroundJob\JobList
Source:lib/private/BackgroundJob/JobList.php#42
Implements:OCP\BackgroundJob\IJobList

Properties

protected static property OC\BackgroundJob\JobList::$connection
Source:lib/private/BackgroundJob/JobList.php#45
Type:\OCP\IDBConnection
protected static property OC\BackgroundJob\JobList::$config
Source:lib/private/BackgroundJob/JobList.php#48
protected static property OC\BackgroundJob\JobList::$timeFactory
Source:lib/private/BackgroundJob/JobList.php#51

Methods

public OC\BackgroundJob\JobList::__construct($connection, $config, $timeFactory)
Source:

lib/private/BackgroundJob/JobList.php#58

Parameters:
public OC\BackgroundJob\JobList::add($job, $argument=null)
Source:

lib/private/BackgroundJob/JobList.php#68

Parameters:
public OC\BackgroundJob\JobList::remove($job, $argument=null)
Source:

lib/private/BackgroundJob/JobList.php#97

Parameters:
protected OC\BackgroundJob\JobList::removeById($id)
Source:

lib/private/BackgroundJob/JobList.php#117

Parameters:
  • $id (int)
public OC\BackgroundJob\JobList::has($job, $argument)
check if a job is in the list
Source:

lib/private/BackgroundJob/JobList.php#131

Parameters:
Returns:

bool

public OC\BackgroundJob\JobList::getAll()
get all jobs in the list
Source:lib/private/BackgroundJob/JobList.php#160
Returns:\OCP\BackgroundJob\IJob[]
Deprecated:9.0.0 - This method is dangerous since it can cause load and memory problems when creating too many instances.
public OC\BackgroundJob\JobList::getNext()
get the next job in the list
Source:lib/private/BackgroundJob/JobList.php#183
Returns:\OCP\BackgroundJob\IJob | null
public OC\BackgroundJob\JobList::getById($id)
Source:

lib/private/BackgroundJob/JobList.php#239

Parameters:
  • $id (int)
Returns:

\OCP\BackgroundJob\IJob | null

public OC\BackgroundJob\JobList::setLastJob($job)
set the job that was last ran
Source:

lib/private/BackgroundJob/JobList.php#292

Parameters:
public OC\BackgroundJob\JobList::unlockJob($job)
Remove the reservation for a job
Source:

lib/private/BackgroundJob/JobList.php#302

Parameters:
public OC\BackgroundJob\JobList::setLastRun($job)
set the lastRun of $job to now
Source:

lib/private/BackgroundJob/JobList.php#315

Parameters:
public OC\BackgroundJob\JobList::setExecutionTime($job, $timeTaken)
Source:

lib/private/BackgroundJob/JobList.php#327

Parameters: