12use UnexpectedValueException;
58 'requestId' => Telemetry::getInstance()->getRequestId(),
75 $page = PageReferenceValue::localReference(
NS_SPECIAL,
'Badtitle/' . __CLASS__ );
83 foreach (
$params as $p => $v ) {
84 if ( is_array( $v ) ) {
86 } elseif ( !is_scalar( $v ) && $v !==
null ) {
87 throw new UnexpectedValueException(
"Job parameter $p is not JSON serializable." );
104 return isset( $this->params[
'jobReleaseTimestamp'] )
111 return !empty( $this->opts[
'removeDuplicates'] );
120 if ( is_array( $info[
'params'] ) ) {
122 unset( $info[
'params'][
'rootJobSignature'] );
123 unset( $info[
'params'][
'rootJobTimestamp'] );
125 unset( $info[
'params'][
'jobReleaseTimestamp'] );
127 unset( $info[
'params'][
'requestId'] );
128 if ( isset( $this->opts[
'removeDuplicatesIgnoreParams'] ) ) {
129 foreach ( $this->opts[
'removeDuplicatesIgnoreParams'] as $field ) {
130 unset( $info[
'params'][$field] );
141 'rootJobSignature' => $this->params[
'rootJobSignature'] ??
null,
142 'rootJobTimestamp' => $this->params[
'rootJobTimestamp'] ?? null
148 return isset( $this->params[
'rootJobSignature'] )
149 && isset( $this->params[
'rootJobTimestamp'] );
154 return $this->
hasRootJobParams() && !empty( $this->params[
'rootJobIsSelf'] );
167 PageReferenceValue::localReference( $map[
'title'][
'ns'], $map[
'title'][
'key'] )
173class_alias( JobSpecification::class,
'JobSpecification' );
wfTimestampOrNull( $outputtype=TS_UNIX, $ts=null)
Return a formatted timestamp, or null if input is null.