if ( count( $args ) < 1 ) {
echo "Usage: php recompressTracked.php [options] <cluster> [... <cluster>...]
-Moves blobs indexed by trackBlobs.php to a specified list of destination clusters, and recompresses them in the process. Restartable.
+Moves blobs indexed by trackBlobs.php to a specified list of destination clusters,
+and recompresses them in the process. Restartable.
Options:
- --procs <procs> Set the number of child processes (default 1)
- --copy-only Copy only, do not update the text table. Restart without this option to complete.
- --debug-log <file> Log debugging data to the specified file
- --info-log <file> Log progress messages to the specified file
- --critical-log <file> Log error messages to the specified file
+ --procs <procs> Set the number of child processes (default 1)
+ --copy-only Copy only, do not update the text table. Restart
+ without this option to complete.
+ --debug-log <file> Log debugging data to the specified file
+ --info-log <file> Log progress messages to the specified file
+ --critical-log <file> Log error messages to the specified file
";
exit( 1 );
}
public $debugLog, $infoLog, $criticalLog;
public $store;
- static $optionsWithArgs = array( 'procs', 'slave-id', 'debug-log', 'info-log', 'critical-log' );
- static $cmdLineOptionMap = array(
+ private static $optionsWithArgs = array(
+ 'procs',
+ 'slave-id',
+ 'debug-log',
+ 'info-log',
+ 'critical-log'
+ );
+
+ private static $cmdLineOptionMap = array(
'no-count' => 'noCount',
'procs' => 'numProcs',
'copy-only' => 'copyOnly',
/**
* Move tracked text in a given page
+ *
+ * @param int $pageId
*/
function doPage( $pageId ) {
$title = Title::newFromId( $pageId );
* without data loss.
*
* The transaction is kept short to reduce locking.
+ *
+ * @param int $textId
+ * @param string $url
*/
function moveTextRow( $textId, $url ) {
if ( $this->copyOnly ) {
*
* This function completes any moves that only have done bt_new_url. This
* can happen when the script is interrupted, or when --copy-only is used.
+ *
+ * @param array $conds
*/
function finishIncompleteMoves( $conds ) {
$dbr = wfGetDB( DB_SLAVE );
/**
* Gets a DB master connection for the given external cluster name
- * @param $cluster string
+ * @param string $cluster
* @return DatabaseBase
*/
function getExtDB( $cluster ) {
/**
* Move an orphan text_id to the new cluster
+ *
+ * @param array $textIds
*/
function doOrphanList( $textIds ) {
// Finish incomplete moves
/**
* Add text.
* Returns false if it's ready to commit.
- * @param $text string
- * @param $textId
+ * @param string $text
+ * @param int $textId
* @return bool
*/
function addItem( $text, $textId ) {