Rebake and Oneboxes confusion

Hi there, on my testbed migration from Drupal I ran a bunch of regexp_replace commands from the Postegres console, requiring a rebake of all the posts. So for the past >12 hours I have rake posts:rebake still crunching through almost 2M posts. I checked out one of the topics that already got rebaked and I noticed that Oneboxes aren’t displaying unless I manually edit the post (Rebuild HTML doesn’t help). So if I understand correctly it appears that I’m going to have to spend another 20 hours to run rake posts:refresh_oneboxes ? That command also echoes: Rebaking post markdown for 'default'" , which makes me think that I could have killed two birds with one stone by initially running just refresh_oneboxes to refresh the Oneboxes and also rebuild the post HTML after the regexp replacements?

It looks like I could alternatively run this in rails c :

Post.find_each do |p|
    p.rebake!(invalidate_oneboxes: true) ###Needed?

Would that be any faster than the rake command?

Also, while on this subject I’d like to understand when I also need to use in the Rails console, would it be needed for the above process?

Thanks a lot!

Sorry about the lack of replies as you probably already have the posts rebaked, but for future reference:

I think that rake posts:rebake would be the fastest way and is less prone to erroring. To make the rebaking go faster, I would recommend giving the forum more resources (specifically Memory capacity and CPU cores) so that it can crank through the posts faster. Rebaking is only limited by the resources the machine has.

1 Like

Excellent, many thanks for confirming that!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.