CirrusSearch
Elasticsearch-powered search for MediaWiki
Loading...
Searching...
No Matches
CirrusSearch\Maintenance\SaneitizeLoop Class Reference

Create saneitize jobs for a single execution of a saneitizer loop. More...

Public Member Functions

 __construct ( $profileName, $pushJobFreq, $chunkSize, $minLoopDuration, $logger=null)
 
 run (Document $jobInfo, $numJobs, $minId, $maxId)
 Generate jobs for one run of a saneitize loop.
 

Detailed Description

Create saneitize jobs for a single execution of a saneitizer loop.

Maintains state in the job info pertaining to current position in the loop. The job info must be persisted between runs.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA. http://www.gnu.org/copyleft/gpl.html

Constructor & Destructor Documentation

◆ __construct()

CirrusSearch\Maintenance\SaneitizeLoop::__construct ( $profileName,
$pushJobFreq,
$chunkSize,
$minLoopDuration,
$logger = null )
Parameters
string$profileNameName of the saneitizer profile to use in created jobs
int$pushJobFreqThe frequency, in seconds, that the saneitize loop is executed
int$chunkSizeThe number of pages to include per job
int$minLoopDurationMinimum number of seconds between loop restarts
callable | null$loggerCallable accepting 2 arguments, first a log message and second either a channel name or null.

Member Function Documentation

◆ run()

CirrusSearch\Maintenance\SaneitizeLoop::run ( Document $jobInfo,
$numJobs,
$minId,
$maxId )

Generate jobs for one run of a saneitize loop.

Parameters
Document$jobInfo
int$numJobsThe number of jobs to create
int$minIdMinimum page_id on the wiki
int$maxIdMaximum page_id on the wiki
Returns
CheckerJob[] The created jobs. May be less than requested.

The documentation for this class was generated from the following file: