82 $page = PageReferenceValue::localReference(
NS_SPECIAL,
'Badtitle/' . __CLASS__ );
93 foreach (
$params as $p => $v ) {
94 if ( is_array( $v ) ) {
96 } elseif ( !is_scalar( $v ) && $v !==
null ) {
97 throw new UnexpectedValueException(
"Job parameter $p is not JSON serializable." );
112 return Title::castFromPageReference( $this->page );
120 return isset( $this->params[
'jobReleaseTimestamp'] )
126 return !empty( $this->opts[
'removeDuplicates'] );
134 if ( is_array( $info[
'params'] ) ) {
136 unset( $info[
'params'][
'rootJobSignature'] );
137 unset( $info[
'params'][
'rootJobTimestamp'] );
139 unset( $info[
'params'][
'jobReleaseTimestamp'] );
140 if ( isset( $this->opts[
'removeDuplicatesIgnoreParams'] ) ) {
141 foreach ( $this->opts[
'removeDuplicatesIgnoreParams'] as $field ) {
142 unset( $info[
'params'][$field] );
152 'rootJobSignature' => $this->params[
'rootJobSignature'] ??
null,
153 'rootJobTimestamp' => $this->params[
'rootJobTimestamp'] ?? null
158 return isset( $this->params[
'rootJobSignature'] )
159 && isset( $this->params[
'rootJobTimestamp'] );
163 return $this->
hasRootJobParams() && !empty( $this->params[
'rootJobIsSelf'] );
176 'ns' => $this->page->getNamespace(),
177 'key' => $this->page->getDBkey()
192 PageReferenceValue::localReference( $map[
'title'][
'ns'], $map[
'title'][
'key'] )
wfTimestampOrNull( $outputtype=TS_UNIX, $ts=null)
Return a formatted timestamp, or null if input is null.
wfDeprecated( $function, $version=false, $component=false, $callerOffset=2)
Logs a warning that a deprecated feature was used.
Job queue task description base code.
array $params
Array of job parameters or false if none.
__construct( $type, array $params, array $opts=[], PageReference $page=null)
validateParams(array $params)
static newFromArray(array $map)
getDeduplicationInfo()
Subclasses may need to override this to make duplication detection work.
Interface for serializable objects that describe a job queue task.