From 8f7d98dd8daf1e1c9fa08dcef823203c9d15e54f Mon Sep 17 00:00:00 2001 From: Peter Bhat Harkins Date: Thu, 1 Sep 2022 08:12:08 -0500 Subject: [PATCH] cron job to fill flagged commenters cache --- script/fill_flagged_cache.rb | 10 ++++++++++ 1 file changed, 10 insertions(+) create mode 100755 script/fill_flagged_cache.rb diff --git a/script/fill_flagged_cache.rb b/script/fill_flagged_cache.rb new file mode 100755 index 00000000..05d1380b --- /dev/null +++ b/script/fill_flagged_cache.rb @@ -0,0 +1,10 @@ +#!/usr/bin/env ruby + +APP_PATH = File.expand_path('../../config/application', __FILE__) +require File.expand_path('../../config/boot', __FILE__) +require APP_PATH +Rails.application.require_environment! + +# fills the cache - used by app/views/users/show.html.erb for mods + +FlaggedCommenters.new('1m').commenters