Invision Community 4: SEO, prepare for v5 and dormant account notifications By Matt Monday at 02:04 PM
maddog107_merged Posted November 25, 2015 Posted November 25, 2015 Hello, I have a question about the Background Tasks that are done immediatlly after the upgrade from 3.x to 4.1.4. So I have added /usr/bin/php -d memory_limit=-1 -d max_execution_time=0 /var/www/html/domain.com/main/applications/core/interface/task/task.php 893483489389489ahr88 and I see it run in cron but I see essentially 0 CPU utilization and 0 mysql usage in 'top'. In 12 hours its only done Updating Attachments storage URLs1.37%Deleting legacy topic data24.95126705653%Deleting legacy post data8.9390386869871%Updating Attachments storage URLs1.6% And 0% for everything else. So the question I have is two fold. First is it possible to run in parallel, meaning is there someway I can kick off Rebuilding SignaturesRebuilding postsRebuilding topicsRebuilding announcementsetc... At the same time or is it sequential that it requires the deleting legacy stuff first to complete before it can run the rest? I have 24threads/64gb available and as mentioned its doing essentially nothing. The other question does this use a "$perCycle" like the upgrader does? I increased the "perCycle" on the upgrader and it went from 36hour upgrade to a 8hour upgrade time and was utilizing 1 CPU at 100% and Mysql at 50%. Thanks.
maddog107_merged Posted November 25, 2015 Author Posted November 25, 2015 Maybe someone who understands the code better then I do but is this doing essentially a "LIMIT" or what is the array(0 , 5) specifying? So can I increase that to say 0, 500 to select 500 rows at a time to loop through? less applications/forums/extensions/core/Queue/DeleteLegacyTopics.php public function run( $data, $offset ) { $select = \IPS\Db::i()->select( '*', 'forums_topics', 'approved > 1', 'tid ASC', array( 0, 5 ) ); if ( !count( $select ) ) { throw new \OutOfRangeException; } $done = 0; foreach( new \IPS\Patterns\ActiveRecordIterator( $select, 'IPS\forums\Topic' ) as $topic ) { $topic->delete(); $done++; } return $offset + $done; }
Recommended Posts
Archived
This topic is now archived and is closed to further replies.