Status: | effective |
Progress: | 95% |
Version: | 2.0.0+ |
Help:UpdateJob
The UpdateJob
(or more precise SMW\UpdateJob
) is used to perform asynchronous store updates for low priority tasks (or long running tasks) with results not immediately necessary during a page edit.
From a technical point of view, UpdateJob
is embedded in MediaWiki's Job queue and delegates all management activities (job status, id generation, job attempts, job caching) to the job queue handler while the sole purpose of UpdateJob
is to re-render a page (to generate a ParserOutput
object) and initiate an update of the store.
Currently, the UpdateJob
only supports a shallow update* meaning that an update only involves the store and leaving additional MediaWiki updates to its respective MediaWiki job (`refreshlinks` etc.).
As of Semantic MediaWiki 2.0.0Released on an unknown date unknown versions of MediaWiki, the direct** invocation of a UpdateJob
is triggered by the following tasks:
rebuildData.php
scriptSpecial:SMWAdmin
when initiating an update- Change a property type (only for pages that involve the `Property` namespace)
- Delete a page (only for when
$smwgOnDeleteAction
is customized) - Move a page (create a redirect)
shallow update refers to that a job does not update the page display or parser cache, so in general it might happen that part of the wiki page still displays based on old data (e.g. formatting in-page values based on a datatype that has since been changed), whereas the Factbox and query/browsing interfaces might already show the updated records.
direct in terms of that it is directly controlled by SMW as to when the job is triggered. Updates triggered by extensions or templates are not directly contributed to SMW even if the SMW\UpdateJob
name it suggests.
Configuration
- $smwgEnabledDeferredUpdate (Sets whether updates to pages are queued and executed after edits)
- $smwgFulltextDeferredUpdate (Sets the number of expected full-text search index updates)
- $smwgEnableUpdateJobs (Sets whether tasks are deferred until after a page was edited by using the job queue)
- $smwgPostEditUpdate (Sets how many jobs should be executed as part of a post-edit event)