Change-Id: I461ea9710660d061ae2da1f99f39247877332ca2
private function getBackoffTimeToWait( Job $job ) {
global $wgJobBackoffThrottling;
- if ( !isset( $wgJobBackoffThrottling[$job->getType()] ) ) {
+ if ( !isset( $wgJobBackoffThrottling[$job->getType()] ) ||
+ $job instanceof DuplicateJob // no work was done
+ ) {
return 0; // not throttled
}
+
$itemsPerSecond = $wgJobBackoffThrottling[$job->getType()];
if ( $itemsPerSecond <= 0 ) {
return 0; // not throttled