[MTOS-dev] Command-line rebuilds for MT 4.1?
Mark Carey
mark at mt-hacks.com
Wed May 7 05:04:29 PDT 2008
On Tue, May 6, 2008 at 8:41 PM, Dan Sanderson <contact at dansanderson.com> wrote:
> And FWIW, yes rebuilding from the web interface works fine, except for the
> inability to rebuild 4000 pages without tripping on server errors every few
> hundred pages.
Agreed, though 4.15 should help with this on a few fronts (especially
caching). My Cache Block plugin [1] can also help, which is supported
on MT 3.3+.
> (I haven't gotten MT-Hacks' SmartRebuild working yet either,
> but one thing at a time.)
Actually this plugin is design specifically for MT 3.3x installs.
MT4+ included improvements that were very similar to those provided by
Smart Rebuild. I probably need to update the plugin page to make this
point clearer.
Finally, as Bud suggested, Tim's mt-rebuild works fine on MT 4.1
(script location issue aside), I use on a few client sites, mostly to
rebuild certain indexes via cron. It probably won't work (without
modifcation) for *new* MT4+ archive types (author, etc.).
While we are one the subject, a little while back I played with
modifying mt-rebuild to do rebuild via fileinfo. The concept mirrors
in some ways the way publishing queue works, using a FileInfo record
as an input, the rebuilder can rebuild that file. My idea was to go
straight to the FileInfo table, fetch a bunch of records, and loop
through them to do the rebuilds. This seems much more efficient that
the typical way that MT would rebuild things like "all monthly
archives", which is looping through all entries and checking the date
on each one, and so on. It worked well, but got stalled when a bad
FileInfo record was found, and the rebuild process would die. For
whatever reason, I found some FileInfo records that were old yet not
removed from the table, such as a record that pointed to template or
templatemap that no longer exists. To work properly, the rebuild
process would need to handle these more gracefully, skipping over (or
cleaning up) bad records, and continuing the rebuild process to the
end. I have also submitted the idea to 6A as a potential approach to
web-based rebuilding as well, though I am not sure how far it went ...
this is potentially the basis for a new 4.1-based Smart Rebuild, time
will tell...
-Mark
[1] http://mt-hacks.com/cacheblock.html
More information about the MTOS-dev
mailing list