85 foreach (
$params as $p => $v ) {
86 if ( is_array( $v ) ) {
88 } elseif ( !is_scalar( $v ) && $v !==
null ) {
89 throw new UnexpectedValueException(
"Job parameter $p is not JSON serializable." );
107 return isset( $this->params[
'jobReleaseTimestamp'] )
113 return !empty( $this->opts[
'removeDuplicates'] );
119 'namespace' => $this->
getTitle()->getNamespace(),
120 'title' => $this->
getTitle()->getDBkey(),
123 if ( is_array( $info[
'params'] ) ) {
125 unset( $info[
'params'][
'rootJobSignature'] );
126 unset( $info[
'params'][
'rootJobTimestamp'] );
128 unset( $info[
'params'][
'jobReleaseTimestamp'] );
136 'rootJobSignature' => $this->params[
'rootJobSignature'] ??
null,
137 'rootJobTimestamp' => $this->params[
'rootJobTimestamp'] ?? null
142 return isset( $this->params[
'rootJobSignature'] )
143 && isset( $this->params[
'rootJobTimestamp'] );
147 return $this->
hasRootJobParams() && !empty( $this->params[
'rootJobIsSelf'] );
160 'ns' => $this->title->getNamespace(),
161 'key' => $this->title->getDBkey()
172 $title = Title::makeTitle( $map[
'title'][
'ns'], $map[
'title'][
'key'] );
174 return new self( $map[
'type'], $map[
'params'], $map[
'opts'],
$title );
wfTimestampOrNull( $outputtype=TS_UNIX, $ts=null)
Return a formatted timestamp, or null if input is null.
Job queue task description base code.
array $params
Array of job parameters or false if none.
__construct( $type, array $params, array $opts=[], Title $title=null)
validateParams(array $params)
static newFromArray(array $map)
getDeduplicationInfo()
Subclasses may need to override this to make duplication detection work.
Represents a title within MediaWiki.
getNamespace()
Get the namespace index, i.e.
getDBkey()
Get the main part with underscores.
Interface for serializable objects that describe a job queue task.