List of maintenance scripts / rake tasks?

(Allen - Watchman Monitoring) #1

I’ve got some missing images in my install.

I remember reading about a rake task to fix them, but haven’t been able to find its mention here on meta.

Where might I find it, and a listing of other rake tasks which might be used for troubleshooting / fixing discourse?

(Allen - Watchman Monitoring) #2


I found & ran this:

RUBY_GC_MALLOC_LIMIT=90000000 RAILS_ENV=production bundle exec rake avatars:regenerate

Looking for the rest of those options…

(Régis Hanol) #3

That’s for regenerating avatars. You might want to rebake the posts with

RUBY_GC_MALLOC_LIMIT=90000000 RAILS_ENV=production bundle exec rake posts:rebake

(Allen - Watchman Monitoring) #4

Thanks Régis,

That script ran fine & updated the majority of our posts. Now I see labels such as “orginal poster” and “frequent poster” very nice.

My larger question is: How would I know that task existed?

What is the task I could run to fix the handful of broken gravatars which are in our forum?

(Régis Hanol) #5

I believe you can list all the available rake tasks with either rake -T or rake --tasks.

Unfortunately, I’m not aware of any magical rake task that will fix your broken avatars. How are they broken? Are you missing all the avatars of some of your users or only a few thumbnails?

(Allen - Watchman Monitoring) #6

Aha! rake -T was what I was looking for, thank you.

This is the full list:

Next is to determine which are most useful.

(system) #7

(David Taylor) #8