cron job to fill flagged commenters cache

This commit is contained in:
Peter Bhat Harkins 2022-09-01 08:12:08 -05:00
parent b731305b94
commit 8f7d98dd8d
1 changed files with 10 additions and 0 deletions

10
script/fill_flagged_cache.rb Executable file
View File

@ -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