Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
mcsg Posted December 18, 2019 Posted December 18, 2019 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.
bfarber Posted December 18, 2019 Posted December 18, 2019 No, you will need to have your converter software class initiate them in the finish() method, or write a standalone script you can call in the browser to initiate them.
mcsg Posted January 20, 2020 Author Posted January 20, 2020 @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' ) );
bfarber Posted January 21, 2020 Posted January 21, 2020 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".
Recommended Posts
Archived
This topic is now archived and is closed to further replies.