67 'requestId' => Telemetry::getInstance()->getRequestId(),
84 $page = PageReferenceValue::localReference(
NS_SPECIAL,
'Badtitle/' . __CLASS__ );
95 foreach (
$params as $p => $v ) {
96 if ( is_array( $v ) ) {
98 } elseif ( !is_scalar( $v ) && $v !==
null ) {
99 throw new UnexpectedValueException(
"Job parameter $p is not JSON serializable." );
113 return isset( $this->params[
'jobReleaseTimestamp'] )
119 return !empty( $this->opts[
'removeDuplicates'] );
127 if ( is_array( $info[
'params'] ) ) {
129 unset( $info[
'params'][
'rootJobSignature'] );
130 unset( $info[
'params'][
'rootJobTimestamp'] );
132 unset( $info[
'params'][
'jobReleaseTimestamp'] );
134 unset( $info[
'params'][
'requestId'] );
135 if ( isset( $this->opts[
'removeDuplicatesIgnoreParams'] ) ) {
136 foreach ( $this->opts[
'removeDuplicatesIgnoreParams'] as $field ) {
137 unset( $info[
'params'][$field] );
147 'rootJobSignature' => $this->params[
'rootJobSignature'] ??
null,
148 'rootJobTimestamp' => $this->params[
'rootJobTimestamp'] ?? null
153 return isset( $this->params[
'rootJobSignature'] )
154 && isset( $this->params[
'rootJobTimestamp'] );
158 return $this->
hasRootJobParams() && !empty( $this->params[
'rootJobIsSelf'] );
169 'type' => $this->type,
171 'opts' => $this->opts,
173 'ns' => $this->page->getNamespace(),
174 'key' => $this->page->getDBkey()
189 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.
__construct( $type, array $params, array $opts=[], ?PageReference $page=null)
array $params
Array of job parameters or false if none.
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.