December 18, 2019 in Technical Problems
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)?
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.
@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:
require_once( 'init.php' );
\IPS\Task::queue( 'convert', 'RebuildTagCache', array( 'link' => 'forums_topics', 'class' => 'IPS\forums\Topic' ), 3, array( 'app', 'link', 'class' ) );
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".
This topic is now archived and is closed to further replies.