Jump to content

Importing forums, need to Rebuild Tag Cache


mcsg

Recommended Posts

We are migrating from IPS in production v4.4.6 that has a split membership controlled by a Rails app.

In doing so, we're trying a converter to move between the production system and our local system to do some cleanup and data management.

We will be changing the tags and need to initiate several types of tasks that I know are there (they're performed during the migrations/conversion) but I need to initiate them manually.

Is it possible to initiate these tasks manually (at will)?

RebuildItemCounts
RebuildTagCache
RebuildContainerCounts

Thanks.

Link to comment
Share on other sites

  • 1 month later...

@bfarber Would you mind helping me with that? Using pieces found in the converter classes, I've got a method to initiate the process, but I need to rebuild the tag cache for all forums (and pages too, I would guess). I did notice that rebuilding the search index *appears* to rebuild the tag caches, but I would prefer not to rebuild the whole search index since it is huge.  This is what I have so far:

<?php
require_once( 'init.php' );
\IPS\Dispatcher\External::i();
\IPS\Task::queue( 'convert', 'RebuildTagCache', array( 'link' => 'forums_topics', 'class' => 'IPS\forums\Topic' ), 3, array( 'app', 'link', 'class' ) );

 

Link to comment
Share on other sites

Yes, that is how you would do it in a standalone script. If you also need to do it for a Pages database, you would add

\IPS\Task::queue( 'convert', 'RebuildTagCache', array( 'link' => 'forums_topics', 'class' => 'IPS\cms\RecordsX' ), 3, array( 'app', 'link', 'class' ) );

where "X" (in "RecordsX") is the database id. i.e. for the built in articles database which is id 1, it would be "Records1".

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...