Jump to content

Kézikönyv:$wgJobClasses

From mediawiki.org
This page is a translated version of the page Manual:$wgJobClasses and the translation is 67% complete.
Kiterjesztések: $wgJobClasses
A feladatoknak az azokat kezelő osztályokhoz való rendelése.
Bevezetve:1.11.0 (r23173)
Eltávolítva:használatban
Megengedett értékek:(tömb)
Alapértelmezett érték:lásd alább

Részletek

A változóval a feladatokat az azokat kezelő osztályokhoz lehet rendelni. A kiterjesztések az egyedi feladatok elvégzéséhez szerkeszthetik ezt a listát. See Manual:Job queue/For developers for more information.

A MediaWiki 1.30 óta az egyszerű osztálynevek alternatívájaként lehetőség van a visszahívások használatára. Ez azon kiterjesztéseknek van fenntartva, amelyek a feladataik elvégzéséhez teljes hozzáférést igényelnek, ezáltal rögzíthetik a függőségeket.

Extensions

Extensions can add to this via the JobClasses object in extension.json :

"JobClasses": {
    "myExtDoSomething": "MediaWiki\\Extension\\MyExt\\Job\\DoSomethingJob"
},

The key must be unique and match what's specified in the job's constructor, and the value is the job class.

Alapértelmezett érték

MediaWiki-verzió:
1.43
$wgJobClasses = [
	'deletePage' => DeletePageJob::class, // 1.32
	'refreshLinks' => RefreshLinksJob::class, // 1.11
	'deleteLinks' => DeleteLinksJob::class, // 1.27
	'htmlCacheUpdate' => HTMLCacheUpdateJob::class, // 1.11
	'sendMail' => [
		'class' => EmaillingJob::class,
		'services' => [
			'Emailer',
		],
	],
	'enotifNotify' => EnotifNotifyJob::class, // 1.11
	'fixDoubleRedirect' => [
		'class' => DoubleRedirectJob::class,
		'services' => [
			'RevisionLookup',
			'MagicWordFactory',
			'WikiPageFactory',
		],
		// This job requires a title
		'needsPage' => true,
	],
	'AssembleUploadChunks' => AssembleUploadChunksJob::class,
	'PublishStashedFile' => PublishStashedFileJob::class,
	'ThumbnailRender' => ThumbnailRenderJob::class,
    'UploadFromUrl' => UploadFromUrlJob::class, // 1.42
	'recentChangesUpdate' => RecentChangesUpdateJob::class,
	'refreshLinksPrioritized' => RefreshLinksJob::class,
	'refreshLinksDynamic' => RefreshLinksJob::class, // 1.27
	'activityUpdateJob' => ActivityUpdateJob::class, // 1.26
	'categoryMembershipChange' => CategoryMembershipChangeJob::class, // 1.35
	'clearUserWatchlist' => ClearUserWatchlistJob::class, // 1.31
	'watchlistExpiry' => WatchlistExpiryJob::class, // 1.35
	'cdnPurge' => CdnPurgeJob::class, // 1.27
	'userGroupExpiry' => UserGroupExpiryJob::class, // 1.31
	'clearWatchlistNotifications' => ClearWatchlistNotificationsJob::class, // 1.31
	'userOptionsUpdate' => UserOptionsUpdateJob::class, // 1.34
	'revertedTagUpdate' => RevertedTagUpdateJob::class, // 1.36
	'null' => NullJob::class,
	'userEditCountInit' => UserEditCountInitJob::class, // 1.36
	'parsoidCachePrewarm' => [ // 1.40
		'class' => ParsoidCachePrewarmJob::class,
		'services' => [
			'ParserOutputAccess',
			'PageStore',
			'RevisionLookup',
			'ParsoidSiteConfig', // 1.43
		],
		// tell the JobFactory not to include the $page parameter in the constructor call
		'needsPage' => false,
	],
	'renameUser' => [ // 1.40
		'class' => RenameUserJob::class,
		'services' => [
			'MainConfig',
			'DBLoadBalancerFactory',
		],
	],
];
MediaWiki-verzió:
1.42
$wgJobClasses = [
	'deletePage' => DeletePageJob::class, // 1.32
	'refreshLinks' => RefreshLinksJob::class, // 1.11
	'deleteLinks' => DeleteLinksJob::class, // 1.27
	'htmlCacheUpdate' => HTMLCacheUpdateJob::class, // 1.11
	'sendMail' => [
		'class' => EmaillingJob::class,
		'services' => [
			'Emailer',
		],
	],
	'enotifNotify' => EnotifNotifyJob::class, // 1.11
	'fixDoubleRedirect' => [
		'class' => DoubleRedirectJob::class,
		'services' => [
			'RevisionLookup',
			'MagicWordFactory',
			'WikiPageFactory',
		],
		// This job requires a title
		'needsPage' => true,
	],
	'AssembleUploadChunks' => AssembleUploadChunksJob::class,
	'PublishStashedFile' => PublishStashedFileJob::class,
	'ThumbnailRender' => ThumbnailRenderJob::class,
    'UploadFromUrl' => UploadFromUrlJob::class, // 1.42
	'recentChangesUpdate' => RecentChangesUpdateJob::class,
	'refreshLinksPrioritized' => RefreshLinksJob::class,
	'refreshLinksDynamic' => RefreshLinksJob::class, // 1.27
	'activityUpdateJob' => ActivityUpdateJob::class, // 1.26
	'categoryMembershipChange' => CategoryMembershipChangeJob::class, // 1.35
	'clearUserWatchlist' => ClearUserWatchlistJob::class, // 1.31
	'watchlistExpiry' => WatchlistExpiryJob::class, // 1.35
	'cdnPurge' => CdnPurgeJob::class, // 1.27
	'userGroupExpiry' => UserGroupExpiryJob::class, // 1.31
	'clearWatchlistNotifications' => ClearWatchlistNotificationsJob::class, // 1.31
	'userOptionsUpdate' => UserOptionsUpdateJob::class, // 1.34
	'revertedTagUpdate' => RevertedTagUpdateJob::class, // 1.36
	'null' => NullJob::class,
	'userEditCountInit' => UserEditCountInitJob::class, // 1.36
	'parsoidCachePrewarm' => [ // 1.40
		'class' => ParsoidCachePrewarmJob::class,
		'services' => [
			'ParsoidOutputAccess',
			'PageStore',
			'RevisionLookup',
		],
		// tell the JobFactory not to include the $page parameter in the constructor call
		'needsPage' => false,
	],
	'renameUser' => [ // 1.40
		'class' => RenameUserJob::class,
		'services' => [
			'MainConfig',
			'DBLoadBalancerFactory',
		],
	],
];
MediaWiki-verzió:
1.41
$wgJobClasses = [
	'deletePage' => DeletePageJob::class, // 1.32
	'refreshLinks' => RefreshLinksJob::class, // 1.11
	'deleteLinks' => DeleteLinksJob::class, // 1.27
	'htmlCacheUpdate' => HTMLCacheUpdateJob::class, // 1.11
	'sendMail' => EmaillingJob::class, // 1.11
	'enotifNotify' => EnotifNotifyJob::class, // 1.11
	'fixDoubleRedirect' => [
		'class' => DoubleRedirectJob::class,
		'services' => [
			'RevisionLookup',
			'MagicWordFactory',
			'WikiPageFactory',
		],
		// This job requires a title
		'needsPage' => true,
	],
	'AssembleUploadChunks' => AssembleUploadChunksJob::class,
	'PublishStashedFile' => PublishStashedFileJob::class,
	'ThumbnailRender' => ThumbnailRenderJob::class,
	'recentChangesUpdate' => RecentChangesUpdateJob::class,
	'refreshLinksPrioritized' => RefreshLinksJob::class,
	'refreshLinksDynamic' => RefreshLinksJob::class, // 1.27
	'activityUpdateJob' => ActivityUpdateJob::class, // 1.26
	'categoryMembershipChange' => CategoryMembershipChangeJob::class, // 1.35
	'clearUserWatchlist' => ClearUserWatchlistJob::class, // 1.31
	'watchlistExpiry' => WatchlistExpiryJob::class, // 1.35
	'cdnPurge' => CdnPurgeJob::class, // 1.27
	'userGroupExpiry' => UserGroupExpiryJob::class, // 1.31
	'clearWatchlistNotifications' => ClearWatchlistNotificationsJob::class, // 1.31
	'userOptionsUpdate' => UserOptionsUpdateJob::class, // 1.34
	'revertedTagUpdate' => RevertedTagUpdateJob::class, // 1.36
	'null' => NullJob::class,
	'userEditCountInit' => UserEditCountInitJob::class, // 1.36
	'parsoidCachePrewarm' => [ // 1.40
		'class' => ParsoidCachePrewarmJob::class,
		'services' => [
			'ParsoidOutputAccess',
			'PageStore',
			'RevisionLookup',
		],
		// tell the JobFactory not to include the $page parameter in the constructor call
		'needsPage' => false,
	],
	'renameUser' => [ // 1.40
		'class' => RenameUserJob::class,
		'services' => [
			'MainConfig',
			'DBLoadBalancerFactory',
		],
	],
];
MediaWiki-verzió:
1.40
$wgJobClasses = [
	'deletePage' => DeletePageJob::class, // 1.32
	'refreshLinks' => RefreshLinksJob::class, // 1.11
	'deleteLinks' => DeleteLinksJob::class, // 1.27
	'htmlCacheUpdate' => HTMLCacheUpdateJob::class, // 1.11
	'sendMail' => EmaillingJob::class, // 1.11
	'enotifNotify' => EnotifNotifyJob::class, // 1.11
	'fixDoubleRedirect' => DoubleRedirectJob::class,
	'AssembleUploadChunks' => AssembleUploadChunksJob::class,
	'PublishStashedFile' => PublishStashedFileJob::class,
	'ThumbnailRender' => ThumbnailRenderJob::class,
	'recentChangesUpdate' => RecentChangesUpdateJob::class,
	'refreshLinksPrioritized' => RefreshLinksJob::class,
	'refreshLinksDynamic' => RefreshLinksJob::class, // 1.27
	'activityUpdateJob' => ActivityUpdateJob::class, // 1.26
	'categoryMembershipChange' => CategoryMembershipChangeJob::class, // 1.35
	'clearUserWatchlist' => ClearUserWatchlistJob::class, // 1.31
	'watchlistExpiry' => WatchlistExpiryJob::class, // 1.35
	'cdnPurge' => CdnPurgeJob::class, // 1.27
	'userGroupExpiry' => UserGroupExpiryJob::class, // 1.31
	'clearWatchlistNotifications' => ClearWatchlistNotificationsJob::class, // 1.31
	'userOptionsUpdate' => UserOptionsUpdateJob::class, // 1.34
	'revertedTagUpdate' => RevertedTagUpdateJob::class, // 1.36
	'null' => NullJob::class,
	'userEditCountInit' => UserEditCountInitJob::class, // 1.36
	'parsoidCachePrewarm' => [ // 1.40
		'class' => ParsoidCachePrewarmJob::class,
		'services' => [
			'ParsoidOutputAccess',
			'PageStore',
			'RevisionLookup',
		],
		// tell the JobFactory not to include the $page parameter in the constructor call
		'needsPage' => false,
	],
	'renameUser' => [ // 1.40
		'class' => RenameUserJob::class,
		'services' => [
			'MainConfig',
			'DBLoadBalancerFactory',
		],
	],
];
MediaWiki-verziók:
1.36 – 1.39
$wgJobClasses = [
	'deletePage' => DeletePageJob::class, // 1.32
	'refreshLinks' => RefreshLinksJob::class, // 1.11
	'deleteLinks' => DeleteLinksJob::class, // 1.27
	'htmlCacheUpdate' => HTMLCacheUpdateJob::class, // 1.11
	'sendMail' => EmaillingJob::class, // 1.11
	'enotifNotify' => EnotifNotifyJob::class, // 1.11
	'fixDoubleRedirect' => DoubleRedirectJob::class,
	'AssembleUploadChunks' => AssembleUploadChunksJob::class,
	'PublishStashedFile' => PublishStashedFileJob::class,
	'ThumbnailRender' => ThumbnailRenderJob::class,
	'recentChangesUpdate' => RecentChangesUpdateJob::class,
	'refreshLinksPrioritized' => RefreshLinksJob::class,
	'refreshLinksDynamic' => RefreshLinksJob::class, // 1.27
	'activityUpdateJob' => ActivityUpdateJob::class, // 1.26
	'categoryMembershipChange' => CategoryMembershipChangeJob::class, // 1.35
	'clearUserWatchlist' => ClearUserWatchlistJob::class, // 1.31
	'watchlistExpiry' => WatchlistExpiryJob::class, // 1.35
	'cdnPurge' => CdnPurgeJob::class, // 1.27
	'userGroupExpiry' => UserGroupExpiryJob::class, // 1.31
	'clearWatchlistNotifications' => ClearWatchlistNotificationsJob::class, // 1.31
	'userOptionsUpdate' => UserOptionsUpdateJob::class, // 1.34
	'revertedTagUpdate' => RevertedTagUpdateJob::class, // 1.36
	'enqueue' => EnqueueJob::class, // local queue for multi-DC setups
	'null' => NullJob::class,
	'userEditCountInit' => UserEditCountInitJob::class, // 1.36
];
MediaWiki-verzió:
1.35
$wgJobClasses = [
	'deletePage' => DeletePageJob::class, // 1.32
	'refreshLinks' => RefreshLinksJob::class, // 1.11
	'deleteLinks' => DeleteLinksJob::class, // 1.27
	'htmlCacheUpdate' => HTMLCacheUpdateJob::class, // 1.11
	'sendMail' => EmaillingJob::class, // 1.11
	'enotifNotify' => EnotifNotifyJob::class, // 1.11
	'fixDoubleRedirect' => DoubleRedirectJob::class,
	'AssembleUploadChunks' => AssembleUploadChunksJob::class,
	'PublishStashedFile' => PublishStashedFileJob::class,
	'ThumbnailRender' => ThumbnailRenderJob::class,
	'recentChangesUpdate' => RecentChangesUpdateJob::class,
	'refreshLinksPrioritized' => RefreshLinksJob::class,
	'refreshLinksDynamic' => RefreshLinksJob::class, // 1.27
	'activityUpdateJob' => ActivityUpdateJob::class, // 1.26
	'categoryMembershipChange' => CategoryMembershipChangeJob::class, // 1.35
	'clearUserWatchlist' => ClearUserWatchlistJob::class, // 1.31
	'watchlistExpiry' => WatchlistExpiryJob::class, // 1.35
	'cdnPurge' => CdnPurgeJob::class, // 1.27
	'userGroupExpiry' => UserGroupExpiryJob::class, // 1.31
	'clearWatchlistNotifications' => ClearWatchlistNotificationsJob::class, // 1.31
	'userOptionsUpdate' => UserOptionsUpdateJob::class, // 1.34
	'enqueue' => EnqueueJob::class, // local queue for multi-DC setups
	'null' => NullJob::class,
];
MediaWiki-verzió:
1.34
$wgJobClasses = [
	'deletePage' => DeletePageJob::class, // 1.32
	'refreshLinks' => RefreshLinksJob::class, // 1.11
	'deleteLinks' => DeleteLinksJob::class, // 1.27
	'htmlCacheUpdate' => HTMLCacheUpdateJob::class, // 1.11
	'sendMail' => EmaillingJob::class, // 1.11
	'enotifNotify' => EnotifNotifyJob::class, // 1.11
	'fixDoubleRedirect' => DoubleRedirectJob::class,
	'AssembleUploadChunks' => AssembleUploadChunksJob::class,
	'PublishStashedFile' => PublishStashedFileJob::class,
	'ThumbnailRender' => ThumbnailRenderJob::class,
	'recentChangesUpdate' => RecentChangesUpdateJob::class,
	'refreshLinksPrioritized' => RefreshLinksJob::class,
	'refreshLinksDynamic' => RefreshLinksJob::class, // 1.27
	'activityUpdateJob' => ActivityUpdateJob::class, // 1.26
	'categoryMembershipChange' => function ( Title $title, $params = [] ) { // 1.33
		$pc = MediaWikiServices::getInstance()->getParserCache();
		return new CategoryMembershipChangeJob( $pc, $title, $params );
	},
	'clearUserWatchlist' => ClearUserWatchlistJob::class, // 1.31
	'cdnPurge' => CdnPurgeJob::class, // 1.27
	'userGroupExpiry' => UserGroupExpiryJob::class, // 1.31
	'clearWatchlistNotifications' => ClearWatchlistNotificationsJob::class, // 1.31
	'userOptionsUpdate' => UserOptionsUpdateJob::class, // 1.34
	'enqueue' => EnqueueJob::class, // local queue for multi-DC setups
	'null' => NullJob::class,
];
MediaWiki-verzió:
1.33
$wgJobClasses = [
	'deletePage' => DeletePageJob::class, // 1.32
	'refreshLinks' => RefreshLinksJob::class, // 1.11
	'deleteLinks' => DeleteLinksJob::class, // 1.27
	'htmlCacheUpdate' => HTMLCacheUpdateJob::class, // 1.11
	'sendMail' => EmaillingJob::class, // 1.11
	'enotifNotify' => EnotifNotifyJob::class, // 1.11
	'fixDoubleRedirect' => DoubleRedirectJob::class,
	'AssembleUploadChunks' => AssembleUploadChunksJob::class,
	'PublishStashedFile' => PublishStashedFileJob::class,
	'ThumbnailRender' => ThumbnailRenderJob::class,
	'recentChangesUpdate' => RecentChangesUpdateJob::class,
	'refreshLinksPrioritized' => RefreshLinksJob::class,
	'refreshLinksDynamic' => RefreshLinksJob::class, // 1.27
	'activityUpdateJob' => ActivityUpdateJob::class, // 1.26
	'categoryMembershipChange' => function ( Title $title, $params = [] ) { // 1.33
		$pc = MediaWikiServices::getInstance()->getParserCache();
		return new CategoryMembershipChangeJob( $pc, $title, $params );
	},
	'clearUserWatchlist' => ClearUserWatchlistJob::class, // 1.31
	'cdnPurge' => CdnPurgeJob::class, // 1.27
	'userGroupExpiry' => UserGroupExpiryJob::class, // 1.31
	'clearWatchlistNotifications' => ClearWatchlistNotificationsJob::class, // 1.31
	'enqueue' => EnqueueJob::class, // local queue for multi-DC setups
	'null' => NullJob::class,
];
MediaWiki-verzió:
1.32
$wgJobClasses = [
	'deletePage' => DeletePageJob::class, // 1.32
	'refreshLinks' => RefreshLinksJob::class, // 1.11
	'deleteLinks' => DeleteLinksJob::class, // 1.27
	'htmlCacheUpdate' => HTMLCacheUpdateJob::class, // 1.11
	'sendMail' => EmaillingJob::class, // 1.11
	'enotifNotify' => EnotifNotifyJob::class, // 1.11
	'fixDoubleRedirect' => DoubleRedirectJob::class,
	'AssembleUploadChunks' => AssembleUploadChunksJob::class,
	'PublishStashedFile' => PublishStashedFileJob::class,
	'ThumbnailRender' => ThumbnailRenderJob::class,
	'recentChangesUpdate' => RecentChangesUpdateJob::class,
	'refreshLinksPrioritized' => RefreshLinksJob::class,
	'refreshLinksDynamic' => RefreshLinksJob::class, // 1.27
	'activityUpdateJob' => ActivityUpdateJob::class, // 1.26
	'categoryMembershipChange' => CategoryMembershipChangeJob::class, // 1.27
	'clearUserWatchlist' => ClearUserWatchlistJob::class, // 1.31
	'cdnPurge' => CdnPurgeJob::class, // 1.27
	'userGroupExpiry' => UserGroupExpiryJob::class, // 1.31
	'clearWatchlistNotifications' => ClearWatchlistNotificationsJob::class, // 1.31
	'enqueue' => EnqueueJob::class, // local queue for multi-DC setups
	'null' => NullJob::class,
];
MediaWiki-verzió:
1.31
$wgJobClasses = [
	'refreshLinks' => RefreshLinksJob::class, // 1.11
	'deleteLinks' => DeleteLinksJob::class, // 1.27
	'htmlCacheUpdate' => HTMLCacheUpdateJob::class, // 1.11
	'sendMail' => EmaillingJob::class, // 1.11
	'enotifNotify' => EnotifNotifyJob::class, // 1.11
	'fixDoubleRedirect' => DoubleRedirectJob::class,
	'AssembleUploadChunks' => AssembleUploadChunksJob::class,
	'PublishStashedFile' => PublishStashedFileJob::class,
	'ThumbnailRender' => ThumbnailRenderJob::class,
	'recentChangesUpdate' => RecentChangesUpdateJob::class,
	'refreshLinksPrioritized' => RefreshLinksJob::class,
	'refreshLinksDynamic' => RefreshLinksJob::class, // 1.27
	'activityUpdateJob' => ActivityUpdateJob::class, // 1.26
	'categoryMembershipChange' => CategoryMembershipChangeJob::class, // 1.27
	'clearUserWatchlist' => ClearUserWatchlistJob::class, // 1.31
	'cdnPurge' => CdnPurgeJob::class, // 1.27
	'userGroupExpiry' => UserGroupExpiryJob::class, // 1.31
	'clearWatchlistNotifications' => ClearWatchlistNotificationsJob::class, // 1.31
	'enqueue' => EnqueueJob::class, // local queue for multi-DC setups
	'null' => NullJob::class,
];
MediaWiki-verziók:
1.27 – 1.30
$wgJobClasses = [
	'refreshLinks' => 'RefreshLinksJob', // 1.11
	'deleteLinks' => 'DeleteLinksJob', // 1.27
	'htmlCacheUpdate' => 'HTMLCacheUpdateJob', // 1.11
	'sendMail' => 'EmaillingJob', // 1.11
	'enotifNotify' => 'EnotifNotifyJob', // 1.11
	'fixDoubleRedirect' => 'DoubleRedirectJob',
	'AssembleUploadChunks' => 'AssembleUploadChunksJob',
	'PublishStashedFile' => 'PublishStashedFileJob',
	'ThumbnailRender' => 'ThumbnailRenderJob',
	'recentChangesUpdate' => 'RecentChangesUpdateJob',
	'refreshLinksPrioritized' => 'RefreshLinksJob',
	'refreshLinksDynamic' => 'RefreshLinksJob', // 1.27
	'activityUpdateJob' => 'ActivityUpdateJob', // 1.26
	'categoryMembershipChange' => 'CategoryMembershipChangeJob', // 1.27
	'cdnPurge' => 'CdnPurgeJob', // 1.27
	'enqueue' => 'EnqueueJob', // local queue for multi-DC setups
	'null' => 'NullJob'
];
MediaWiki-verzió:
1.26
$wgJobClasses = array(
	'refreshLinks' => 'RefreshLinksJob', // 1.11
	'htmlCacheUpdate' => 'HTMLCacheUpdateJob', // 1.11
	'sendMail' => 'EmaillingJob', // 1.11
	'enotifNotify' => 'EnotifNotifyJob', // 1.11
	'fixDoubleRedirect' => 'DoubleRedirectJob',
	'uploadFromUrl' => 'UploadFromUrlJob',
	'AssembleUploadChunks' => 'AssembleUploadChunksJob',
	'PublishStashedFile' => 'PublishStashedFileJob',
	'ThumbnailRender' => 'ThumbnailRenderJob',
	'recentChangesUpdate' => 'RecentChangesUpdateJob',
	'refreshLinksPrioritized' => 'RefreshLinksJob', // for cascading protection
	'activityUpdateJob' => 'ActivityUpdateJob', // 1.26
	'enqueue' => 'EnqueueJob', // local queue for multi-DC setups
	'null' => 'NullJob'
);
MediaWiki-verziók:
1.11 – 1.12
$wgJobClasses = array(
	'refreshLinks' => 'RefreshLinksJob', // 1.11
	'htmlCacheUpdate' => 'HTMLCacheUpdateJob', // 1.11
	'html_cache_update' => 'HTMLCacheUpdateJob', // backwards-compatible
	'sendMail' => 'EmaillingJob', // 1.11
	'enotifNotify' => 'EnotifNotifyJob', // 1.11
);