These tools are designed to be run automatically, typically on a nightly basis, to keep parts of the system up to date. The main task at present is to keep model statistics up to date, and this is the job of updatestats.
The updatestats command is there to ensure that a model's record is kept up to date with respect to the sets she is associated with. This is done because the model record actually keeps some basic statistics about the sets, number of images and video clips and types of activity featured in those sets in order to better describe the model and her activities (on camera). Of course, much of this information is ultimately derived from the sets she features in; for instance, if she features in a lesbian set, the assumption is that she does lesbian scenes on camera! Obviously examining every set each time a model page is loaded is unlikely to be very practical, so the schema design has this data cached within the model record.
Generally updatestats needs to be run after each time updates are made to the Wacs collection, but in practice it's probably easier to simply configure it to run once per day. To do this we once again make use of the cron timed execution facility (described in the section called “Configuring Automatic Download” of Chapter 13, The Download System). In this example, it is being set to run at just after midnight (modulo the advice above about making sure the machine will be likely to switched on at that time):
% crontab -e
and add the following line to the entry:
15 0 * * * /usr/local/bin/updatestats
Tip | |
---|---|
As of Wacs 0.8.6, updatestats produces a summary on the standard output of what has changed. It mentions who has new sets, new types of sets and what totals they've now reached. |