Příručka:$wgJobClasses

This page is a translated version of the page Manual:$wgJobClasses and the translation is 100% complete.
Rozšíření: $wgJobClasses
Mapuje úlohy do jejich manipulačních tříd.
Zavedeno od verze:1.11.0 (r23173)
Odstraněno od verze:stále se používá
Povolené hodnoty:(pole)
Výchozí hodnota:viz níže

Podrobnosti

Mapuje úlohy do jejich manipulačních tříd. K tomu lze přidat rozšíření, která poskytují vlastní úlohy. Další informace získáte na stránce Manual:Job queue/For developers .

Od verze MediaWiki 1.30 může specifikovat funkce zpětného volání jako alternativu k prostým názvům tříd. To je určeno pro rozšíření, která chtějí mít kontrolu nad konkretizací svých úloh, aby umožnila správné vkládání závislostí.

Rozšíření

Rozšíření můžete přidat pomocí objektu JobClasses v extension.json :

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

Klíč musí být jedinečný a odpovídat tomu, co je zadáno v konstruktoru úlohy, a hodnotou je třída úlohy.

Výchozí hodnota

Verze MediaWiki:
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',
		],
	],
];
Verze MediaWiki:
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',
		],
	],
];
Verze MediaWiki:
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',
		],
	],
];
Verze MediaWiki:
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',
		],
	],
];
Verze MediaWiki:
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
];
Verze MediaWiki:
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, // místní fronta pro nastavení více DC
	'null' => NullJob::class,
];
Verze MediaWiki:
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,
];
Verze MediaWiki:
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,
];
Verze MediaWiki:
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,
];
Verze MediaWiki:
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,
];
Verze MediaWiki:
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'
];
Verze MediaWiki:
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'
);
Verze MediaWiki:
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
);