We have a staged environment with 1 CMS and 3 Slave servers
I want to create a page on the slave server, which will be called by the staging module on a successful publish, that will rebuild all indexes and the links database.
I know I can use:
Globals.LinkDatabase.Rebuild(Factory.GetDatabase("web"));
to rebuild the link database.
How do I get the above code in a separate process that has access to the sitecore context and also how do I rebuild all the indexes for the web database – again in a separate background thread.
Thanks
I’ve come across this issue before with Sitecore and took a slightly different approch. Instead of having a page that the staging module calls I tapped into the publish:end event and added a custom handler to rebuild the Link Database.