67 'requestId' => Telemetry::getInstance()->getRequestId(),
84 $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." );
110 return isset( $this->params[
'jobReleaseTimestamp'] )
116 return !empty( $this->opts[
'removeDuplicates'] );
124 if ( is_array( $info[
'params'] ) ) {
126 unset( $info[
'params'][
'rootJobSignature'] );
127 unset( $info[
'params'][
'rootJobTimestamp'] );
129 unset( $info[
'params'][
'jobReleaseTimestamp'] );
131 unset( $info[
'params'][
'requestId'] );
132 if ( isset( $this->opts[
'removeDuplicatesIgnoreParams'] ) ) {
133 foreach ( $this->opts[
'removeDuplicatesIgnoreParams'] as $field ) {
134 unset( $info[
'params'][$field] );
144 'rootJobSignature' => $this->params[
'rootJobSignature'] ??
null,
145 'rootJobTimestamp' => $this->params[
'rootJobTimestamp'] ?? null
150 return isset( $this->params[
'rootJobSignature'] )
151 && isset( $this->params[
'rootJobTimestamp'] );
155 return $this->
hasRootJobParams() && !empty( $this->params[
'rootJobIsSelf'] );
166 'type' => $this->type,
168 'opts' => $this->opts,
170 'ns' => $this->page->getNamespace(),
171 'key' => $this->page->getDBkey()
186 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.