Architecture:MediaWiki/maintenance layer

From mediawiki.org
Jump to navigation Jump to search

The maintenance layer contains functionality for maintaining a MediaWiki installation, to be triggered from the command line. This includes background processes, housekeeping jobs, trouble shooting, error investigations, etc.

Status: As per August 2020, the maintenance layer is well defined and long established. However, at this time, each maintenance script acts as its own separate entry point, which means that the maintenance logic resides in the entry point file, while the shared bootstrapping code is pulled in as a utility. This is conceptually backwards, and is bound to change in the future (see T99268).

Dependencies and Constraints: Code in the maintenance layer can make use of anything except for installer related code.

Typical patterns: The pattern used by most code in the maintenance layer is the maintenance script pattern. However, this may be refactored to make use of the command pattern instead, when a command line "runner" has been created (per T99268).

Example: The most important maintenance script is update.php.