Manual:copyJobQueue.php

This page is a translated version of the page Manual:CopyJobQueue.php and the translation is 67% complete.
Other languages:
MediaWiki バージョン:
1.22

詳細

copyJobQueue.php ファイルは、あるジョブ キュー システムから別のジョブ キュー システムへすべてのジョブをコピーするメンテナンス スクリプトです。

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'
    ]
];

オプション/引数

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

使用法

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.

関連項目