Help:Configuration parameter "$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|
|First version supported||220.127.116.11|
|Last version supported||still available|
|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 18.104.22.168.
$GLOBALS['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.
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
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:
$smwgOnDeleteAction = array( 'smwgDeleteSubjectAsDeferredJob' => true, 'smwgDeleteSubjectWithAssociatesRefresh' => true );
$smwgEnableUpdateJobsis 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.
- Task T61204 about the rationale for this parameter