Page MenuHomePhabricator

JobQueue::push returns void, return value is used in code
Closed, ResolvedPublic

Description

JobQueue::push

final public function push( $jobs, $flags = 0 ) {

		$this->batchPush( is_array( $jobs ) ? $jobs : array( $jobs ), $flags );

}

JobQueueGroup::push

		$ok = true;
		foreach ( $jobsByType as $type => $jobs ) {
			if ( $this->get( $type )->push( $jobs ) ) {
				JobQueueAggregator::singleton()->notifyQueueNonEmpty( $this->wiki, $type );
			} else {
				$ok = false;
			}
		}

So $ok is always going to become false


Version: 1.23.0
Severity: major

Details

Reference
bz64007

Event Timeline

bzimport raised the priority of this task from to High.Nov 22 2014, 3:11 AM
bzimport set Reference to bz64007.
bzimport added a subscriber: Unknown Object (MLST).

Link to merged Gerrit patch welcome for setting + flags.

Fixed in master in https://gerrit.wikimedia.org/r/#/c/126731/ by reverting https://gerrit.wikimedia.org/r/#/c/123498/

Cleanup change was valid, just all callers weren't correctly cleaned up, meaning things that were returning true were now returning void

The original revert was backported into REL1_23 already.