Last modified: 2014-04-29 21:44:02 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T66007, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 64007 - JobQueue::push returns void, return value is used in code
JobQueue::push returns void, return value is used in code
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
JobQueue (Other open bugs)
1.23.0
All All
: High major (vote)
: 1.23.0 release
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2014-04-16 17:26 UTC by Sam Reed (reedy)
Modified: 2014-04-29 21:44 UTC (History)
4 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---
legoktm.wikipedia: Backport_to_Stable+


Attachments

Description Sam Reed (reedy) 2014-04-16 17:26:00 UTC
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
Comment 1 Andre Klapper 2014-04-17 10:33:53 UTC
Link to merged Gerrit patch welcome for setting + flags.
Comment 2 Sam Reed (reedy) 2014-04-21 19:00:26 UTC
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
Comment 3 Kunal Mehta (Legoktm) 2014-04-29 21:44:02 UTC
The original revert was backported into REL1_23 already.

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links