http://www.mediawiki.org/wiki/Special:Code/MediaWiki/97502
Revision: 97502
Author: reedy
Date: 2011-09-19 15:15:30 +0000 (Mon, 19 Sep 2011)
Log Message:
-----------
Creating new WMF branch
Added Paths:
-----------
branches/wmf/1.18wmf1/
branches/wmf/1.18wmf1/StartProfiler.php
branches/wmf/1.18wmf1/extensions/AbuseFilter/
branches/wmf/1.18wmf1/extensions/ActiveAbstract/
branches/wmf/1.18wmf1/extensions/AntiBot/
branches/wmf/1.18wmf1/extensions/AntiSpoof/
branches/wmf/1.18wmf1/extensions/ArticleFeedback/
branches/wmf/1.18wmf1/extensions/AssertEdit/
branches/wmf/1.18wmf1/extensions/CategoryTree/
branches/wmf/1.18wmf1/extensions/CentralAuth/
branches/wmf/1.18wmf1/extensions/CentralNotice/
branches/wmf/1.18wmf1/extensions/CharInsert/
branches/wmf/1.18wmf1/extensions/CheckUser/
branches/wmf/1.18wmf1/extensions/Cite/
branches/wmf/1.18wmf1/extensions/ClickTracking/
branches/wmf/1.18wmf1/extensions/ClientSide/
branches/wmf/1.18wmf1/extensions/CodeReview/
branches/wmf/1.18wmf1/extensions/Collection/
branches/wmf/1.18wmf1/extensions/CommunityApplications/
branches/wmf/1.18wmf1/extensions/CommunityHiring/
branches/wmf/1.18wmf1/extensions/CommunityVoice/
branches/wmf/1.18wmf1/extensions/ConditionalShowSection/
branches/wmf/1.18wmf1/extensions/ConfirmEdit/
branches/wmf/1.18wmf1/extensions/ContactPage/
branches/wmf/1.18wmf1/extensions/ContactPageFundraiser/
branches/wmf/1.18wmf1/extensions/ContributionReporting/
branches/wmf/1.18wmf1/extensions/ContributionTracking/
branches/wmf/1.18wmf1/extensions/CustomUserSignup/
branches/wmf/1.18wmf1/extensions/DisableAccount/
branches/wmf/1.18wmf1/extensions/DismissableSiteNotice/
branches/wmf/1.18wmf1/extensions/DonationInterface/
branches/wmf/1.18wmf1/extensions/DoubleWiki/
branches/wmf/1.18wmf1/extensions/DumpHTML/
branches/wmf/1.18wmf1/extensions/EditPageTracking/
branches/wmf/1.18wmf1/extensions/EmailCapture/
branches/wmf/1.18wmf1/extensions/ExpandTemplates/
branches/wmf/1.18wmf1/extensions/ExtensionDistributor/
branches/wmf/1.18wmf1/extensions/FlaggedRevs/
branches/wmf/1.18wmf1/extensions/FlaggedRevs/maintenance/wikimedia-periodic-update.sh
branches/wmf/1.18wmf1/extensions/FormPreloadPostCache/
branches/wmf/1.18wmf1/extensions/FundraiserPortal/
branches/wmf/1.18wmf1/extensions/Gadgets/
branches/wmf/1.18wmf1/extensions/GlobalBlocking/
branches/wmf/1.18wmf1/extensions/GlobalUsage/
branches/wmf/1.18wmf1/extensions/GoogleNewsSitemap/
branches/wmf/1.18wmf1/extensions/ImageMap/
branches/wmf/1.18wmf1/extensions/InputBox/
branches/wmf/1.18wmf1/extensions/LabeledSectionTransclusion/
branches/wmf/1.18wmf1/extensions/LandingCheck/
branches/wmf/1.18wmf1/extensions/LiquidThreads/
branches/wmf/1.18wmf1/extensions/LocalisationUpdate/
branches/wmf/1.18wmf1/extensions/MWSearch/
branches/wmf/1.18wmf1/extensions/Math/
branches/wmf/1.18wmf1/extensions/MobileFrontend/
branches/wmf/1.18wmf1/extensions/MoodBar/
branches/wmf/1.18wmf1/extensions/Narayam/
branches/wmf/1.18wmf1/extensions/NewUserMessage/
branches/wmf/1.18wmf1/extensions/Nuke/
branches/wmf/1.18wmf1/extensions/OAI/
branches/wmf/1.18wmf1/extensions/OggHandler/
branches/wmf/1.18wmf1/extensions/OpenSearchXml/
branches/wmf/1.18wmf1/extensions/Oversight/
branches/wmf/1.18wmf1/extensions/PagedTiffHandler/
branches/wmf/1.18wmf1/extensions/ParserFunctions/
branches/wmf/1.18wmf1/extensions/PdfHandler/
branches/wmf/1.18wmf1/extensions/Poem/
branches/wmf/1.18wmf1/extensions/PoolCounter/
branches/wmf/1.18wmf1/extensions/PrefStats/
branches/wmf/1.18wmf1/extensions/PrefSwitch/
branches/wmf/1.18wmf1/extensions/ProofreadPage/
branches/wmf/1.18wmf1/extensions/Quiz/
branches/wmf/1.18wmf1/extensions/RSS/
branches/wmf/1.18wmf1/extensions/ReaderFeedback/
branches/wmf/1.18wmf1/extensions/Renameuser/
branches/wmf/1.18wmf1/extensions/ScanSet/
branches/wmf/1.18wmf1/extensions/SecurePoll/
branches/wmf/1.18wmf1/extensions/SimpleAntiSpam/
branches/wmf/1.18wmf1/extensions/SimpleSurvey/
branches/wmf/1.18wmf1/extensions/SiteMatrix/
branches/wmf/1.18wmf1/extensions/SkinPerPage/
branches/wmf/1.18wmf1/extensions/SlippyMap/
branches/wmf/1.18wmf1/extensions/SpamBlacklist/
branches/wmf/1.18wmf1/extensions/StrategyWiki/
branches/wmf/1.18wmf1/extensions/StringFunctionsEscaped/
branches/wmf/1.18wmf1/extensions/SubPageList3/
branches/wmf/1.18wmf1/extensions/SyntaxHighlight_GeSHi/
branches/wmf/1.18wmf1/extensions/TitleBlacklist/
branches/wmf/1.18wmf1/extensions/TitleKey/
branches/wmf/1.18wmf1/extensions/TorBlock/
branches/wmf/1.18wmf1/extensions/TrustedXFF/
branches/wmf/1.18wmf1/extensions/UnicodeConverter/
branches/wmf/1.18wmf1/extensions/UploadBlacklist/
branches/wmf/1.18wmf1/extensions/UploadWizard/
branches/wmf/1.18wmf1/extensions/UserDailyContribs/
branches/wmf/1.18wmf1/extensions/UserThrottle/
branches/wmf/1.18wmf1/extensions/VariablePage/
branches/wmf/1.18wmf1/extensions/Vector/
branches/wmf/1.18wmf1/extensions/WikiEditor/
branches/wmf/1.18wmf1/extensions/WikiLove/
branches/wmf/1.18wmf1/extensions/WikimediaIncubator/
branches/wmf/1.18wmf1/extensions/WikimediaMessages/
branches/wmf/1.18wmf1/extensions/cldr/
branches/wmf/1.18wmf1/extensions/intersection/
branches/wmf/1.18wmf1/extensions/normal/
branches/wmf/1.18wmf1/extensions/skins/
branches/wmf/1.18wmf1/extensions/timeline/
branches/wmf/1.18wmf1/extensions/wikidiff/
branches/wmf/1.18wmf1/extensions/wikidiff2/
branches/wmf/1.18wmf1/extensions/wikihiero/
branches/wmf/1.18wmf1/maintenance/jeluf.php
branches/wmf/1.18wmf1/maintenance/jobs-loop.sh
branches/wmf/1.18wmf1/maintenance/storage/make-all-blobs
branches/wmf/1.18wmf1/maintenance/storage/testRctComplete.php
branches/wmf/1.18wmf1/math
Removed Paths:
-------------
branches/wmf/1.18wmf1/extensions/README
Copied: branches/wmf/1.18wmf1/StartProfiler.php (from rev 97501,
branches/wmf/1.17wmf1/StartProfiler.php)
===================================================================
--- branches/wmf/1.18wmf1/StartProfiler.php (rev 0)
+++ branches/wmf/1.18wmf1/StartProfiler.php 2011-09-19 15:15:30 UTC (rev
97502)
@@ -0,0 +1,64 @@
+<?php
+# WARNING: This file is publically viewable on the web. Do not put private
data here.
+#
+$rand = mt_rand(0, 0x7fffffff);
+$host = @$_SERVER['HTTP_HOST'];
+
+/*if ( ( !($rand % 50) && $host == 'en.wikipedia.org' ) ||
+ ( !($rand % 50) && $host == 'commons.wikimedia.org') ||
+ ( !($rand % 50) && $host == 'de.wikipedia.org') ||
+ ( !($rand % 50) && $host == 'es.wikipedia.org') ||
+ ( !($rand % 1) && $host == 'test.wikipedia.org' ) ||
+ ( $host == 'zh.wikipedia.org' ) ||
+ ( !($rand % 10) && $host == 'ja.wikipedia.org' )
+) {*/
+if ( @$_SERVER['REQUEST_URI'] ==
'/w/index.php?title=United_States&action=submit' ) {
+ require_once( dirname(__FILE__).'/includes/ProfilerSimpleUDP.php' );
+ $wgProfiler = new ProfilerSimpleUDP;
+ $wgProfiler->setProfileID( 'bigpage' );
+} elseif (@defined($_REQUEST['forceprofile'])) {
+ require_once( dirname(__FILE__).'/includes/ProfilerSimpleText.php' );
+ $wgProfiler = new ProfilerSimpleText;
+ $wgProfiler->setProfileID( 'forced' );
+} elseif (@defined($_REQUEST['forcetrace'])) {
+ require_once( dirname(__FILE__).'/includes/ProfilerSimpleTrace.php' );
+ $wgProfiler = new ProfilerSimpleTrace;
+} elseif ( strpos( @$_SERVER['REQUEST_URI'], '/w/thumb.php' ) !== false ) {
+ require_once( dirname(__FILE__).'/includes/ProfilerSimpleUDP.php' );
+ $wgProfiler = new ProfilerSimpleUDP;
+ $wgProfiler->setProfileID( 'thumb' );
+} elseif ( $host == 'test2.wikipedia.org' ) {
+ require_once( dirname(__FILE__).'/includes/ProfilerSimpleUDP.php' );
+ $wgProfiler = new ProfilerSimpleUDP;
+ $wgProfiler->setProfileID( 'test2' );
+} elseif ( !( $rand % 50 ) ) {
+ require_once( dirname(__FILE__).'/includes/ProfilerSimpleUDP.php' );
+ $wgProfiler = new ProfilerSimpleUDP;
+ /*
+ if ( $host == 'en.wikipedia.org' ) {
+ $wgProfiler->setProfileID( 'enwiki' );
+ } elseif ( $host == 'de.wikipedia.org' ) {
+ $wgProfiler->setProfileID( 'dewiki' );
+ } elseif ( $host == 'zh.wikipedia.org' ) {
+ $wgProfiler->setProfileID( 'zhwiki' );
+ } elseif ( $host == 'flaggedrevs.labs.wikimedia.org' ) {
+ $wgProfiler->setProfileID( 'flaggedrevs' );
+ } else {
+ $wgProfiler->setProfileID( 'others' );
+ }*/
+ if ( php_sapi_name() == 'cli' ) {
+ $wgProfiler->setProfileID( 'cli' );
+ } else {
+ $wgProfiler->setProfileID( 'all' );
+ }
+ #$wgProfiler->setMinimum(5 /* seconds */);
+}
+elseif ( defined( 'MW_FORCE_PROFILE' ) ) {
+ require_once( dirname(__FILE__).'/includes/Profiler.php' );
+ $wgProfiler = new Profiler;
+} else {
+ require_once( dirname(__FILE__).'/includes/ProfilerStub.php' );
+}
+
+
+
Property changes on: branches/wmf/1.18wmf1/extensions/EditPageTracking
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/REL1_15/phase3/extensions/EditPageTracking:51646
/branches/new-installer/phase3/extensions/EditPageTracking:43664-66004
/branches/sqlite/extensions/EditPageTracking:58211-58321
/branches/wmf/1.16wmf4/extensions/EditPageTracking:67177,69199,76243,77266
/branches/wmf-deployment/extensions/EditPageTracking:60970
/trunk/phase3/extensions/EditPageTracking:79828,79830,79848,79853,79950-79951,79954,79989,80006-80007,80013,80016,80080,80083,80124,80128,80238,80406,81833,83212,83590
Copied:
branches/wmf/1.18wmf1/extensions/FlaggedRevs/maintenance/wikimedia-periodic-update.sh
(from rev 97501,
branches/wmf/1.17wmf1/extensions/FlaggedRevs/maintenance/wikimedia-periodic-update.sh)
===================================================================
---
branches/wmf/1.18wmf1/extensions/FlaggedRevs/maintenance/wikimedia-periodic-update.sh
(rev 0)
+++
branches/wmf/1.18wmf1/extensions/FlaggedRevs/maintenance/wikimedia-periodic-update.sh
2011-09-19 15:15:30 UTC (rev 97502)
@@ -0,0 +1,5 @@
+#!/bin/bash
+for db in `</home/wikipedia/common/flaggedrevs.dblist`;do
+ echo $db
+ php -n /home/wikipedia/common/multiversion/MWScript.php
extensions/FlaggedRevs/maintenance/updateStats.php $db
+done
Property changes on: branches/wmf/1.18wmf1/extensions/MoodBar
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/REL1_15/phase3/extensions/MoodBar:51646
/branches/new-installer/phase3/extensions/MoodBar:43664-66004
/branches/sqlite/extensions/MoodBar:58211-58321
/branches/wmf/1.16wmf4/extensions/MoodBar:67177,69199,76243,77266
/branches/wmf-deployment/extensions/MoodBar:60970
/trunk/phase3/extensions/MoodBar:79828,79830,79848,79853,79950-79951,79954,79989,80006-80007,80013,80016,80080,80083,80124,80128,80238,80406,81833,83212,83590
Property changes on: branches/wmf/1.18wmf1/extensions/Narayam
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/REL1_15/phase3/extensions/Narayam:51646
/branches/new-installer/phase3/extensions/Narayam:43664-66004
/branches/sqlite/extensions/Narayam:58211-58321
/branches/wmf/1.16wmf4/extensions/Narayam:67177,69199,76243,77266
/branches/wmf-deployment/extensions/Narayam:60970
/trunk/phase3/extensions/Narayam:79828,79830,79848,79853,79950-79951,79954,79989,80006-80007,80013,80016,80080,80083,80124,80128,80238,80406,81833,83212,83590
Deleted: branches/wmf/1.18wmf1/extensions/README
===================================================================
--- branches/REL1_18/phase3/extensions/README 2011-09-19 14:49:30 UTC (rev
97498)
+++ branches/wmf/1.18wmf1/extensions/README 2011-09-19 15:15:30 UTC (rev
97502)
@@ -1,27 +0,0 @@
-Extensions (such as the hieroglyphic module WikiHiero) are distributed
-separately. Drop them into this extensions directory and enable as
-per the extension's directions.
-
-If you are a developer, you want to fetch the extension tree in another
-directory and make a symbolic link:
-
- mediawiki/extensions$ ln -s ../../extensions-trunk/FooBarExt
-
-The extensions are available through svn at:
- http://svn.wikimedia.org/svnroot/mediawiki/trunk/extensions/
-
-You can find documentation and additional extensions on MediaWiki website:
- http://www.mediawiki.org/wiki/Category:Extensions
-
-
-Please note that under POSIX systems (Linux...), parent of a symbolic path
-refers to the link source, NOT to the target! You should check the env
-variable MW_INSTALL_PATH in case the extension is not in the default location.
-
-The following code snippet let you override the default path:
-
- $IP = getenv( 'MW_INSTALL_PATH' );
- if( $IP === false ) {
- $IP = dirname( __FILE__ ) . '/../..';
- }
- require( "$IP/maintenance/Maintenance.php" ); // a MediaWiki core file
Property changes on: branches/wmf/1.18wmf1/extensions/TitleBlacklist
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/REL1_15/phase3/extensions/TitleBlacklist:51646
/branches/new-installer/phase3/extensions/TitleBlacklist:43664-66004
/branches/sqlite/extensions/TitleBlacklist:58211-58321
/branches/wmf/1.16wmf4/extensions/TitleBlacklist:67177,69199,76243,77266
/branches/wmf-deployment/extensions/TitleBlacklist:60970
/trunk/phase3/extensions/TitleBlacklist:79828,79830,79848,79853,79950-79951,79954,79989,80006-80007,80013,80016,80080,80083,80124,80128,80238,80406,81833,83212,83590
Property changes on: branches/wmf/1.18wmf1/extensions/WikiLove
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/REL1_15/phase3/extensions/WikiLove:51646
/branches/new-installer/phase3/extensions/WikiLove:43664-66004
/branches/sqlite/extensions/WikiLove:58211-58321
/branches/wmf/1.16wmf4/extensions/WikiLove:67177,69199,76243,77266
/branches/wmf-deployment/extensions/WikiLove:60970
/trunk/phase3/extensions/WikiLove:79828,79830,79848,79853,79950-79951,79954,79989,80006-80007,80013,80016,80080,80083,80124,80128,80238,80406,81833,83212,83590
Property changes on: branches/wmf/1.18wmf1/extensions/WikimediaIncubator
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/REL1_15/phase3/extensions/WikimediaIncubator:51646
/branches/new-installer/phase3/extensions/WikimediaIncubator:43664-66004
/branches/sqlite/extensions/WikimediaIncubator:58211-58321
/branches/wmf/1.16wmf4/extensions/WikimediaIncubator:67177,69199,76243,77266
/branches/wmf-deployment/extensions/WikimediaIncubator:60970
/trunk/phase3/extensions/WikimediaIncubator:79828,79830,79848,79853,79950-79951,79954,79989,80006-80007,80013,80016,80080,80083,80124,80128,80238,80406,81833,83212,83590
Copied: branches/wmf/1.18wmf1/maintenance/jeluf.php (from rev 97501,
branches/wmf/1.17wmf1/maintenance/jeluf.php)
===================================================================
--- branches/wmf/1.18wmf1/maintenance/jeluf.php (rev 0)
+++ branches/wmf/1.18wmf1/maintenance/jeluf.php 2011-09-19 15:15:30 UTC (rev
97502)
@@ -0,0 +1,103 @@
+<?php
+/**
+ * This script starts pending jobs.
+ *
+ * Usage:
+ * --maxjobs <num> (default 10000)
+ * --type <job_cmd>
+ *
+ * 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
+ *
+ * @ingroup Maintenance
+ */
+
+require_once( dirname(__FILE__) . '/Maintenance.php' );
+
+class RunJobs extends Maintenance {
+ public function __construct() {
+ parent::__construct();
+ $this->mDescription = "Run pending jobs";
+ $this->addOption( 'maxjobs', 'Maximum number of jobs to run',
false, true );
+ $this->addOption( 'type', 'Type of job to run', false, true );
+ $this->addOption( 'procs', 'Number of processes to use', false,
true );
+ }
+
+ public function memoryLimit() {
+ // Don't eat all memory on the machine if we get a bad job.
+ return "150M";
+ }
+
+ public function execute() {
+ global $wgTitle;
+ if ( $this->hasOption( 'procs' ) ) {
+ $procs = intval( $this->getOption('procs') );
+ if ( $procs < 1 || $procs > 1000 ) {
+ $this->error( "Invalid argument to --procs",
true );
+ }
+ $fc = new ForkController( $procs );
+ if ( $fc->start( $procs ) != 'child' ) {
+ exit( 0 );
+ }
+ }
+ $maxJobs = $this->getOption( 'maxjobs', 10000 );
+ $type = $this->getOption( 'type', false );
+ $wgTitle = Title::newFromText( 'RunJobs.php' );
+ $dbw = wfGetDB( DB_MASTER );
+ $n = 0;
+ $conds = '';
+ if ($type !== false)
+ $conds = "job_cmd = " . $dbw->addQuotes($type);
+
+ while ( $dbw->selectField( 'job', 'job_id', $conds,
'runJobs.php' ) ) {
+ $offset=0;
+ for (;;) {
+ $job = ($type == false) ?
+ Job::pop($offset)
+ : Job::pop_type($type);
+
+ if ($job == false)
+ break;
+
+ wfWaitForSlaves( 5 );
+ $t = microtime( true );
+ $offset=$job->id;
+ $status = $job->run();
+ $t = microtime( true ) - $t;
+ $timeMs = intval( $t * 1000 );
+ if ( !$status ) {
+ $this->runJobsLog( $job->toString() . "
t=$timeMs error={$job->error}" );
+ } else {
+ $this->runJobsLog( $job->toString() . "
t=$timeMs good" );
+ }
+ if ( $maxJobs && ++$n > $maxJobs ) {
+ break 2;
+ }
+ }
+ }
+ }
+
+ /**
+ * Log the job message
+ * @param $msg String The message to log
+ */
+ private function runJobsLog( $msg ) {
+ $this->output( wfTimestamp( TS_DB ) . " $msg\n" );
+ wfDebugLog( 'runJobs', $msg );
+ }
+}
+
+$maintClass = "RunJobs";
+require_once( DO_MAINTENANCE );
Property changes on: branches/wmf/1.18wmf1/maintenance/jeluf.php
___________________________________________________________________
Added: svn:mergeinfo
+ /branches/REL1_15/phase3/maintenance/jeluf.php:51646
/branches/new-installer/phase3/maintenance/jeluf.php:43664-66004
/branches/sqlite/maintenance/jeluf.php:58211-58321
/branches/wmf/1.16wmf4/maintenance/jeluf.php:67177,69199,76243,77266
/branches/wmf-deployment/maintenance/jeluf.php:60970
/trunk/phase3/maintenance/jeluf.php:79828,79830,79848,79853,79950-79951,79954,79989,80006-80007,80013,80016,80080,80083,80124,80128,80238,80406,81833,83212,83590
Copied: branches/wmf/1.18wmf1/maintenance/jobs-loop.sh (from rev 97501,
branches/wmf/1.17wmf1/maintenance/jobs-loop.sh)
===================================================================
--- branches/wmf/1.18wmf1/maintenance/jobs-loop.sh
(rev 0)
+++ branches/wmf/1.18wmf1/maintenance/jobs-loop.sh 2011-09-19 15:15:30 UTC
(rev 97502)
@@ -0,0 +1,41 @@
+#!/bin/bash
+
+trap 'kill %-; exit' SIGTERM
+[ ! -z "$1" ] && {
+ echo "starting type-specific job runner: $1"
+ type=$1
+}
+
+#types="htmlCacheUpdate sendMail enotifNotify uploadFromUrl fixDoubleRedirect
renameUser"
+types="sendMail enotifNotify uploadFromUrl fixDoubleRedirect"
+
+cd `readlink -f /usr/local/apache/common/multiversion`
+while [ 1 ];do
+ # Do the prioritised types
+ moreprio=y
+ while [ -n "$moreprio" ] ; do
+ moreprio=
+ for type in $types; do
+ db=`php -n MWScript.php nextJobDB.php --wiki=aawiki
--type="$type"`
+ if [ -n "$db" ]; then
+ echo "$db $type"
+ nice -n 20 php MWScript.php runJobs.php
--wiki="$db" --procs=5 --type="$type" --maxtime=300 &
+ wait
+ moreprio=y
+ fi
+ done
+ done
+
+ # Do the remaining types
+ db=`php -n MWScript.php nextJobDB.php --wiki=aawiki`
+
+ if [ -z "$db" ];then
+ # No jobs to do, wait for a while
+ echo "No jobs..."
+ sleep 5
+ else
+ echo "$db"
+ nice -n 20 php MWScript.php runJobs.php --wiki="$db" --procs=5
--maxtime=300 &
+ wait
+ fi
+done
Copied: branches/wmf/1.18wmf1/maintenance/storage/make-all-blobs (from rev
97501, branches/wmf/1.17wmf1/maintenance/storage/make-all-blobs)
===================================================================
--- branches/wmf/1.18wmf1/maintenance/storage/make-all-blobs
(rev 0)
+++ branches/wmf/1.18wmf1/maintenance/storage/make-all-blobs 2011-09-19
15:15:30 UTC (rev 97502)
@@ -0,0 +1,18 @@
+#!/bin/bash
+
+if [ -z $1 ];then
+ echo "Usage: make-all-blobs <server> [<table name>]"
+ exit 1
+fi
+server=$1
+if [ -z $2 ]; then
+ table=blobs
+else
+ table=$2
+fi
+
+for db in `</home/wikipedia/common/all.dblist`;do
+ echo "CREATE DATABASE IF NOT EXISTS $db" | mysql -u wikiadmin
-p`wikiadmin_pass` -h $server && \
+ sed "s/blobs\>/$table/" blobs.sql | mysql -u wikiadmin
-p`wikiadmin_pass` -h $server $db
+done
+
Copied: branches/wmf/1.18wmf1/maintenance/storage/testRctComplete.php (from rev
97501, branches/wmf/1.17wmf1/maintenance/storage/testRctComplete.php)
===================================================================
--- branches/wmf/1.18wmf1/maintenance/storage/testRctComplete.php
(rev 0)
+++ branches/wmf/1.18wmf1/maintenance/storage/testRctComplete.php
2011-09-19 15:15:30 UTC (rev 97502)
@@ -0,0 +1,22 @@
+<?php
+require_once( dirname(__FILE__).'/../commandLine.inc' );
+
+$bad = 0;
+$good = 0;
+foreach ( $wgLocalDatabases as $wiki ) {
+ $lb = wfGetLB( $wiki );
+ $db = $lb->getConnection( DB_SLAVE, array(), $wiki );
+ if ( $db->tableExists( 'blob_tracking' ) ) {
+ $notDone = $db->selectField( 'blob_tracking', '1',
+ array( 'bt_moved' => 0 ) );
+ if ( $notDone ) {
+ $bad++;
+ echo "$wiki\n";
+ } else {
+ $good++;
+ }
+ }
+ $lb->reuseConnection( $db );
+}
+echo "$bad wiki(s) incomplete\n";
+echo "$good wiki(s) complete\n";
Copied: branches/wmf/1.18wmf1/math (from rev 97501,
branches/wmf/1.17wmf1/math/GNUmakefile)
===================================================================
--- branches/wmf/1.18wmf1/math (rev 0)
+++ branches/wmf/1.18wmf1/math 2011-09-19 15:15:30 UTC (rev 97502)
@@ -0,0 +1,2 @@
+all:
+ @echo "Do not run make on the NFS copy, use scap to rebuild it
everywhere"
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs