Manual:CopyJobQueue.php
Appearance
Versão MediaWiki: | ≥ 1.22 |
Arquivo MediaWiki: copyJobQueue.php | |
---|---|
Local: | maintenance/ |
Código fonte: | master • 1.42.3 • 1.41.4 • 1.39.10 |
Classes: | CopyJobQueue |
Detalhes
O arquivo copyJobQueue.php é um script de manutenção para copiar todas as tarefas de um sistema de fila de tarefas para outro.
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'
]
];
Options/Arguments
Option | Description | Required? |
---|---|---|
--src | Key to $wgJobQueueMigrationConfig for source | Required |
--dst | Key to $wgJobQueueMigrationConfig for destination | Required |
--type | Types of jobs to copy (use "all" for all) | Required |
Usage
php maintenance/copyJobQueue.php --src scrKey --dst dstKey --type jobType
Terminal
$ php maintenance/copyJobQueue.php --src db --dst redis --type all Copied 4/5 queued InitImageDataJob jobs. Copied 1/5 delayed InitImageDataJob jobs. Copied 0/0 queued createPdfThumbnailsJob jobs. Copied 0/0 delayed createPdfThumbnailsJob jobs. Copied 13/15 queued renameUser jobs. Copied 1/15 delayed renameUser jobs. Copied 0/0 queued replaceText jobs. Copied 0/0 delayed replaceText jobs. Copied 0/0 queued deletePage jobs. Copied 0/0 delayed deletePage jobs. Copied 0/0 queued refreshLinks jobs. Copied 0/0 delayed refreshLinks jobs. Copied 0/0 queued deleteLinks jobs. Copied 0/0 delayed deleteLinks jobs. Copied 0/0 queued htmlCacheUpdate jobs. Copied 0/0 delayed htmlCacheUpdate jobs. Copied 0/0 queued sendMail jobs. Copied 0/0 delayed sendMail jobs. Copied 0/0 queued enotifNotify jobs. Copied 0/0 delayed enotifNotify jobs. Copied 0/0 queued fixDoubleRedirect jobs. Copied 0/0 delayed fixDoubleRedirect jobs. Copied 0/0 queued AssembleUploadChunks jobs. Copied 0/0 delayed AssembleUploadChunks jobs. Copied 0/0 queued PublishStashedFile jobs. Copied 0/0 delayed PublishStashedFile jobs. Copied 0/0 queued ThumbnailRender jobs. Copied 0/0 delayed ThumbnailRender jobs. Copied 0/0 queued recentChangesUpdate jobs. Copied 0/0 delayed recentChangesUpdate jobs. Copied 0/0 queued refreshLinksPrioritized jobs. Copied 0/0 delayed refreshLinksPrioritized jobs. Copied 0/0 queued refreshLinksDynamic jobs. Copied 0/0 delayed refreshLinksDynamic jobs. Copied 0/0 queued activityUpdateJob jobs. Copied 0/0 delayed activityUpdateJob jobs. Copied 0/0 queued categoryMembershipChange jobs. Copied 0/0 delayed categoryMembershipChange jobs. Copied 0/0 queued clearUserWatchlist jobs. Copied 0/0 delayed clearUserWatchlist jobs. Copied 0/0 queued watchlistExpiry jobs. Copied 0/0 delayed watchlistExpiry jobs. Copied 0/0 queued cdnPurge jobs. Copied 0/0 delayed cdnPurge jobs. Copied 0/0 queued userGroupExpiry jobs. Copied 0/0 delayed userGroupExpiry jobs. Copied 0/0 queued clearWatchlistNotifications jobs. Copied 0/0 delayed clearWatchlistNotifications jobs. Copied 0/0 queued userOptionsUpdate jobs. Copied 0/0 delayed userOptionsUpdate jobs. Copied 0/0 queued revertedTagUpdate jobs. Copied 0/0 delayed revertedTagUpdate jobs. Copied 0/0 queued enqueue jobs. Copied 0/0 delayed enqueue jobs. Copied 0/0 queued null jobs. Copied 0/0 delayed null jobs. Copied 0/0 queued userEditCountInit jobs. Copied 0/0 delayed userEditCountInit jobs.