26use UnexpectedValueException;
72 'requestId' => Telemetry::getInstance()->getRequestId(),
89 $page = PageReferenceValue::localReference(
NS_SPECIAL,
'Badtitle/' . __CLASS__ );
97 foreach (
$params as $p => $v ) {
98 if ( is_array( $v ) ) {
100 } elseif ( !is_scalar( $v ) && $v !==
null ) {
101 throw new UnexpectedValueException(
"Job parameter $p is not JSON serializable." );
115 return isset( $this->params[
'jobReleaseTimestamp'] )
121 return !empty( $this->opts[
'removeDuplicates'] );
129 if ( is_array( $info[
'params'] ) ) {
131 unset( $info[
'params'][
'rootJobSignature'] );
132 unset( $info[
'params'][
'rootJobTimestamp'] );
134 unset( $info[
'params'][
'jobReleaseTimestamp'] );
136 unset( $info[
'params'][
'requestId'] );
137 if ( isset( $this->opts[
'removeDuplicatesIgnoreParams'] ) ) {
138 foreach ( $this->opts[
'removeDuplicatesIgnoreParams'] as $field ) {
139 unset( $info[
'params'][$field] );
149 'rootJobSignature' => $this->params[
'rootJobSignature'] ??
null,
150 'rootJobTimestamp' => $this->params[
'rootJobTimestamp'] ?? null
155 return isset( $this->params[
'rootJobSignature'] )
156 && isset( $this->params[
'rootJobTimestamp'] );
160 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'] )
197class_alias( JobSpecification::class,
'JobSpecification' );
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.