Page MenuHomePhabricator
Paste P944

Resume workaround
ActivePublic

Authored by Mattflaschen-WMF on Jul 11 2015, 3:30 AM.
mattflaschen@terbium:~$ mwscript eval.php --wiki=mediawikiwiki
> $logFilename = '/tmp/Talk:Wikimedia engineering 20% policy_mwdeploy.log';
> $flowBoardTitle = Title::newFromText( 'Talk:Wikimedia engineering 20% policy' );
> $archiveTitle = Title::newFromText( 'Talk:Wikimedia engineering 20% policy/LQT Archive 1' );
> $talkPageManagerUser = \FlowHooks::getOccupationController()->getTalkpageManager();
> $api = new Flow\Import\LiquidThreadsApi\LocalApiBackend( $talkPageManagerUser );
> $importer = Flow\Container::get( 'importer' );
>
> $sourceStore = new Flow\Import\FileImportSourceStore( $logFilename );
>
> $dbw = wfGetDB( DB_MASTER );
>
> $logger = Flow\Container::get( 'default_logger' );
>
> $strategy = new Flow\Import\LiquidThreadsApi\ConversionStrategy( $dbw, $sourceStore, $api, Flow\Container::get( 'url_generator' ), $talkPageManagerUser, Flow\Container::get( 'controller.notification' ) );
>
> $importer->setLogger( $logger );
> $api->setLogger( $logger );
>
> $converter = new \Flow\Import\Converter( $dbw, $importer, $logger, $talkPageManagerUser, $strategy );
>
> $doConversionMethod = new ReflectionMethod( $converter, 'doConversion' );
> $doConversionMethod->setAccessible( true );
> $doConversionMethod->invoke( $converter, $archiveTitle, $flowBoardTitle );