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.
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 SMW 2.0, the direct** invocation of a
UpdateJob is triggered by the following tasks:
Special:SMWAdminwhen initiating an update
- Change a property type (only for pages that involve the `Property` namespace)
- Delete a page (only for when
Help:Configuration parameter "$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.