Help:Configuration parameter "$smwgOnDeleteAction"

From semantic-mediawiki.org
Jump to: navigation, search
edit with form (experimental)


Title $smwgOnDeleteAction
Description Moves the update process for when a page / property and its value assignments are deleted to the job queue.
Default setting See below
Software Semantic MediaWiki
First version supported 1.9.0.1
Last version supported 2.3.1
Configuration Installation
Keyword performance · job queue

$smwgOnDeleteAction is a configuration parameter that is used to move the update process for when a page / property and its value assignments are deleted to the job queue and thus to improve it. The setting was introduced in Semantic MediaWiki 1.9.0.1. It was removed in Semantic MediaWiki 2.4.0 in favor of configuration parameter $smwgEnabledDeferredUpdateSets that updates to pages are queued and executed after edits.1

Default setting

$smwgOnDeleteAction = array(
	'smwgDeleteSubjectAsDeferredJob' => false,
	'smwgDeleteSubjectWithAssociatesRefresh' => false
);

The default setting represents the legacy behaviour (SMW ≤ 1.8.0) where a subject is directly deleted when "action=delete" is executed.

Available options

  • smwgDeleteSubjectAsDeferredJob - Defers the deletion process to a background job.
  • smwgDeleteSubjectWithAssociatesRefresh - Allows to refresh entities that are connected to a deleted subject.

Changing the default setting

To modify this configuration setting, add one of the following lines to your "LocalSettings.php" file after the enableSemantics() call:

$smwgOnDeleteAction = array(
	'smwgDeleteSubjectAsDeferredJob' => true,
	'smwgDeleteSubjectWithAssociatesRefresh' => true
);
NoteNote: Due to performance implications it is advisable that in case smwgDeleteSubjectWithAssociatesRefresh is enabled the deletion process is being handled as a deferred background job with smwgDeleteSubjectAsDeferredJob enabled, too

Notes

  • If configuration parameter $smwgEnableUpdateJobsDefers some tasks until after a page was edited by using the job queue. is disabled (not default) then the deletion process will always run directly even though smwgDeleteSubjectAsDeferredJob (see above) is enabled.
  • In case the deletion is executed as deferred job it is further suggested that the job queue is being run repeatedly within a narrow time frame to avoid an increased backlog.

See also

References

  1. ^  Semantic MediaWiki: GitHub issue gh:smw:1435