81 $page = PageReferenceValue::localReference(
NS_SPECIAL,
'Badtitle/' . __CLASS__ );
92 foreach (
$params as $p => $v ) {
93 if ( is_array( $v ) ) {
95 } elseif ( !is_scalar( $v ) && $v !==
null ) {
96 throw new UnexpectedValueException(
"Job parameter $p is not JSON serializable." );
111 return Title::castFromPageReference( $this->page );
119 return isset( $this->params[
'jobReleaseTimestamp'] )
125 return !empty( $this->opts[
'removeDuplicates'] );
133 if ( is_array( $info[
'params'] ) ) {
135 unset( $info[
'params'][
'rootJobSignature'] );
136 unset( $info[
'params'][
'rootJobTimestamp'] );
138 unset( $info[
'params'][
'jobReleaseTimestamp'] );
139 if ( isset( $this->opts[
'removeDuplicatesIgnoreParams'] ) ) {
140 foreach ( $this->opts[
'removeDuplicatesIgnoreParams'] as $field ) {
141 unset( $info[
'params'][$field] );
151 'rootJobSignature' => $this->params[
'rootJobSignature'] ??
null,
152 'rootJobTimestamp' => $this->params[
'rootJobTimestamp'] ?? null
157 return isset( $this->params[
'rootJobSignature'] )
158 && isset( $this->params[
'rootJobTimestamp'] );
162 return $this->
hasRootJobParams() && !empty( $this->params[
'rootJobIsSelf'] );
175 'ns' => $this->page->getNamespace(),
176 'key' => $this->page->getDBkey()
191 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.