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: Parameters: - $connection (
OCP\IDBConnection
) - $config (
OCP\IConfig
) - $timeFactory (
OCP\AppFramework\Utility\ITimeFactory
)
- $connection (
-
public
OC\BackgroundJob\JobList::
add
($job, $argument=null)¶ Source: Parameters: - $job (
OCP\BackgroundJob\IJob
| string) - $argument (mixed)
- $job (
-
public
OC\BackgroundJob\JobList::
remove
($job, $argument=null)¶ Source: Parameters: - $job (
OCP\BackgroundJob\IJob
| string) - $argument (mixed)
- $job (
-
protected
OC\BackgroundJob\JobList::
removeById
($id)¶ Source: Parameters: - $id (int)
-
public
OC\BackgroundJob\JobList::
has
($job, $argument)¶ - check if a job is in the list
Source: Parameters: - $job (
OCP\BackgroundJob\IJob
| string) - $argument (mixed)
Returns: bool
- $job (
-
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: Parameters: - $id (int)
Returns: \OCP\BackgroundJob\IJob
| null
-
public
OC\BackgroundJob\JobList::
setLastJob
($job)¶ - set the job that was last ran
Source: Parameters: - $job (
OCP\BackgroundJob\IJob
)
- $job (
-
public
OC\BackgroundJob\JobList::
unlockJob
($job)¶ - Remove the reservation for a job
Source: Parameters: - $job (
OCP\BackgroundJob\IJob
)
- $job (
-
public
OC\BackgroundJob\JobList::
setLastRun
($job)¶ - set the lastRun of $job to now
Source: Parameters: - $job (
OCP\BackgroundJob\IJob
)
- $job (
-
public
OC\BackgroundJob\JobList::
setExecutionTime
($job, $timeTaken)¶ Source: Parameters: - $job (
OCP\BackgroundJob\IJob
) - $timeTaken
- $job (