From c9fb5e475dcf454e034f5e24beb9b6a4a755a829 Mon Sep 17 00:00:00 2001 From: Tim Starling Date: Sat, 25 Feb 2006 00:29:15 +0000 Subject: [PATCH] If there's a duplicate, don't delete and recreate, just leave it. --- includes/JobQueue.php | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/includes/JobQueue.php b/includes/JobQueue.php index 265aa9c254..8874f497c5 100644 --- a/includes/JobQueue.php +++ b/includes/JobQueue.php @@ -108,7 +108,10 @@ class Job { $dbw =& wfGetDB( DB_MASTER ); if ( $this->removeDuplicates ) { - $dbw->delete( 'job', $fields, $fname ); + $res = $dbw->select( 'job', array( '1' ), $fields, $fname ); + if ( $dbw->numRows( $res ) ) { + return; + } } $fields['job_id'] = $dbw->nextSequenceValue( 'job_job_id_seq' ); $dbw->insert( 'job', $fields, $fname ); -- 2.20.1