Jump to content

Handbuch:CopyJobQueue.php

From mediawiki.org
The printable version is no longer supported and may have rendering errors. Please update your browser bookmarks and please use the default browser print function instead.
This page is a translated version of the page Manual:CopyJobQueue.php and the translation is 42% complete.
MediaWiki Version:
1.22

Details

copyJobQueue.php file is a maintenance script to copy all jobs from one job queue system to another.

This script requires setting $wgJobQueueMigrationConfig before running. This script processes 500 items in a batch.

The $wgJobQueueMigrationConfig configuration variable consists of keys with array values. These array values are passed to JobQueue::factory(). The parameters in the array should not have wiki or type settings as it will be injected by script itself.

$wgJobQueueMigrationConfig = [
    'db' => [
        'class' => 'JobQueueDB',
        'idGenerator' => 'uniqueId1'
    ],
    'redis' => [
        'class' => 'JobQueueRedis',
        'redisServer' => 'localhost',
        'redisConfig' => [ 'connectTimeout' => 1 ],
        'idGenerator' => 'uniqueId2'
    ]
];

Optionen/Argumente

Option Description Required?
--src Key to $wgJobQueueMigrationConfig for source Notwendig
--dst Key to $wgJobQueueMigrationConfig for destination Notwendig
--type Types of jobs to copy (use "all" for all) Notwendig

Verwendung

php maintenance/run.php copyJobQueue --src scrKey --dst dstKey --type jobType
Terminal
In MediaWiki version MediaWiki 1.39 and earlier, you must invoke maintenance scripts using php maintenance/scriptName.php instead of php maintenance/run.php scriptName.

Siehe auch