66 'requestId' => Telemetry::getInstance()->getRequestId(),
83 $page = PageReferenceValue::localReference(
NS_SPECIAL,
'Badtitle/' . __CLASS__ );
94 foreach (
$params as $p => $v ) {
95 if ( is_array( $v ) ) {
97 } elseif ( !is_scalar( $v ) && $v !==
null ) {
98 throw new UnexpectedValueException(
"Job parameter $p is not JSON serializable." );
112 return isset( $this->params[
'jobReleaseTimestamp'] )
118 return !empty( $this->opts[
'removeDuplicates'] );
126 if ( is_array( $info[
'params'] ) ) {
128 unset( $info[
'params'][
'rootJobSignature'] );
129 unset( $info[
'params'][
'rootJobTimestamp'] );
131 unset( $info[
'params'][
'jobReleaseTimestamp'] );
133 unset( $info[
'params'][
'requestId'] );
134 if ( isset( $this->opts[
'removeDuplicatesIgnoreParams'] ) ) {
135 foreach ( $this->opts[
'removeDuplicatesIgnoreParams'] as $field ) {
136 unset( $info[
'params'][$field] );
146 'rootJobSignature' => $this->params[
'rootJobSignature'] ??
null,
147 'rootJobTimestamp' => $this->params[
'rootJobTimestamp'] ?? null
152 return isset( $this->params[
'rootJobSignature'] )
153 && isset( $this->params[
'rootJobTimestamp'] );
157 return $this->
hasRootJobParams() && !empty( $this->params[
'rootJobIsSelf'] );
168 'type' => $this->type,
170 'opts' => $this->opts,
172 'ns' => $this->page->getNamespace(),
173 'key' => $this->page->getDBkey()
188 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.
array $params
The job parameters.
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.