class RefreshLinksJob extends Job {
/** @var float Cache parser output when it takes this long to render */
const PARSE_THRESHOLD_SEC = 1.0;
- /** @var integer Lag safety margin when comparing root job times to last-refresh times */
+ /** @var int Lag safety margin when comparing root job times to last-refresh times */
const CLOCK_FUDGE = 10;
- /** @var integer How many seconds to wait for replica DBs to catch up */
+ /** @var int How many seconds to wait for replica DBs to catch up */
const LAG_WAIT_TIMEOUT = 15;
function __construct( Title $title, array $params ) {
}
public function workItemCount() {
- return isset( $this->params['pages'] ) ? count( $this->params['pages'] ) : 1;
+ if ( !empty( $this->params['recursive'] ) ) {
+ return 0; // nothing actually refreshed
+ } elseif ( isset( $this->params['pages'] ) ) {
+ return count( $this->params['pages'] );
+ }
+
+ return 1; // one title
}
}