Handbuch:$wgJobClasses

This page is a translated version of the page Manual:$wgJobClasses and the translation is 93% complete.
Erweiterungen: $wgJobClasses
Abbildung von Jobs auf deren Klassen.
Eingeführt in Version:1.11.0 (r23173)
Entfernt in Version:Weiterhin vorhanden
Erlaubte Werte:(Array)
Standardwert:siehe unten

Details

Abbildung von Jobs auf deren Klassen. Erweiterungen können eigene Jobs hinzufügen. Siehe Manual:Job queue/For developers für weitere Informationen.

Seit MediaWiki 1.30 können Callback-Funktionen spezifiziert werden anstelle von Klassennamen. Dies ermöglicht Erweiterungen, eigene Methoden zur Ausführung ihrer Jobs mitzuliefern. Dabei wird Dependency Injection verwendet.

Erweiterungen

Erweiterungen können dies durch Definition eines JobClasses Objekts in extension.json erreichen.

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

Der Schlüssel muss eindeutig sein und dem Namen im Konstruktor des Jobs entsprechen. Der Wert muss der Job-Klasse entsprechen.

Standardwert

MediaWiki Version:
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 Version:
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 Version:
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 Version:
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 Versions:
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 Version:
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 Version:
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 Version:
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 Version:
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 Version:
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 Versions:
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 Version:
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 Versions:
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
);