*/
abstract protected function doGetAllReadyWikiQueues();
+ /**
+ * Purge all of the aggregator information
+ *
+ * @return bool Success
+ */
+ final public function purge() {
+ wfProfileIn( __METHOD__ );
+ $res = $this->doPurge();
+ wfProfileOut( __METHOD__ );
+ return $res;
+ }
+
+ /**
+ * @see JobQueueAggregator::purge()
+ */
+ abstract protected function doPurge();
+
/**
* Get all databases that have a pending job.
* This poll all the queues and is this expensive.
: array(); // cache is both empty and locked
}
+ /**
+ * @see JobQueueAggregator::doPurge()
+ */
+ protected function doPurge() {
+ return $this->cache->delete( $this->getReadyQueueCacheKey() );
+ }
+
/**
* @return string
*/
}
}
+ /**
+ * @see JobQueueAggregator::doPurge()
+ */
+ protected function doPurge() {
+ $conn = $this->getConnection();
+ if ( !$conn ) {
+ return false;
+ }
+ try {
+ $conn->delete( $this->getReadyQueueKey() );
+ } catch ( RedisException $e ) {
+ $this->handleException( $conn, $e );
+ return false;
+ }
+ return true;
+ }
+
/**
* Get a connection to the server that handles all sub-queues for this queue
*