Images tombstoned after import

It seems that after an import images get moved to tombstone. I run

rake uploads:recover_from_tombstone

and they come back, but I would rather figure out how to avoid waiting for them to get tombstoned and then move them back.

I’ve seen @gerhard recommend running redis on the dev box, but I just do a backup and move them to production. Is that what my problem is?

Images are tombstoned iif they’re orphaned (ie. not linked anywhere in the application).

(Wow, that sentence is very sad…)

Images are linked to posts in the CookedPostProcessor class which is run in a background job after a post is saved.

This jobs requires sidekiq to be running but since it’s almost never the case in imports for performance reasons, the link is never stored in the database.

What @gerhard advised is the proper way of fixing this issue

  • run the import with sidekiq not running
  • once the import is done, launch sidekiq and wait for it to finish post processing all the posts
  • backup your import and move it to production

I see, and those things get queued up when the importer runs, and if you back up and restore elsewhere that doesn’t happen. And it’s taken me only a year and several dozen imports to figure that out!

Thanks, @zogstrip!