The piw-rebuild script is used to inject rebuild requests for various web pages into the piwheels system. This script must be run on the same node as the piw-master script.
piw-rebuild [-h] [--version] [-c FILE] [-q] [-v] [-l FILE] [-y] [--import-queue ADDR] part [package]
Show this help message and exit
Show program’s version number and exit
Specify a configuration file to load
Produce less console output
Produce more console output
Log messages to the specified file
Run non-interactively; never prompt during operation
The address of the queue used by piw-rebuild (default: (ipc:///tmp/piw-import); this should always be an ipc address
This utility is used to request rebuilds of parts of the piwheels website. This is primarily useful after manual fixes to the database, manipulation of the file-system, or after large-scale upgrades which require rebuilding many pages.
The mandatory part parameter can be one of the following values, which specify which part of the website to rebuild:
|home||Rebuild the home-page (/index.html)|
|search||Rebuild the JSON search-index (/packages.json)|
|project||Rebuild the project-page for the specified package (/project/package/index.html)|
|index||Rebuild the simple-index and the project-page for the specified package (/simple/package/index.html and /project/package/index.html)|
If part is “project” or “index” you may optionally specify a package name for which to rebuild the specified part. If the package name is omitted, the utility will request a rebuild of the specified part for all known packages in the system.
In the case a rebuild of all packages is requested, you will be
prompted to make sure you wish to continue (this option can take hours to
process on a system with many builds). The
--yes option can be
used to skip this prompt but should be used carefully!
Note that the utility only requests the rebuild of the specified part. This request will be queued, and acted upon as soon as The Scribe reaches it but there is no guarantee this has occurred by the time the utility exits. The return code will be 0 if the rebuild request was queued successfully. If anything fails the return code will be non-zero and the request may or may not have been queued.
The utility should only ever be run directly on the master node (opening the import queue to other machines is a potential security risk).