87 foreach (
$params as $p => $v ) {
88 if ( is_array( $v ) ) {
90 } elseif ( !is_scalar( $v ) && $v !==
null ) {
91 throw new UnexpectedValueException(
"Job parameter $p is not JSON serializable." );
109 return isset( $this->params[
'jobReleaseTimestamp'] )
115 return !empty( $this->opts[
'removeDuplicates'] );
123 if ( is_array( $info[
'params'] ) ) {
125 unset( $info[
'params'][
'rootJobSignature'] );
126 unset( $info[
'params'][
'rootJobTimestamp'] );
128 unset( $info[
'params'][
'jobReleaseTimestamp'] );
129 if ( isset( $this->opts[
'removeDuplicatesIgnoreParams'] ) ) {
130 foreach ( $this->opts[
'removeDuplicatesIgnoreParams'] as $field ) {
131 unset( $info[
'params'][$field] );
141 'rootJobSignature' => $this->params[
'rootJobSignature'] ??
null,
142 'rootJobTimestamp' => $this->params[
'rootJobTimestamp'] ?? null
147 return isset( $this->params[
'rootJobSignature'] )
148 && isset( $this->params[
'rootJobTimestamp'] );
152 return $this->
hasRootJobParams() && !empty( $this->params[
'rootJobIsSelf'] );
165 'ns' => $this->title->getNamespace(),
166 'key' => $this->title->getDBkey()
177 $title = Title::makeTitle( $map[
'title'][
'ns'], $map[
'title'][
'key'] );
179 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.