about summary refs log tree commit diff
diff options
context:
space:
mode:
authormultiple creatures <dev@multiple-creature.party>2019-11-17 14:22:33 -0600
committermultiple creatures <dev@multiple-creature.party>2019-11-17 14:22:33 -0600
commit81942defe915389a130f17268b4e644bf8e2c7d5 (patch)
tree11b5dcac5df155f6f79a0e96d042d1c30e53cd7c
parent86750fff3fbb92298978b324592447f3205b63fa (diff)
Hardcoded disabling of `Formatter` cache in normalizer.
-rw-r--r--app/helpers/text_helper.rb4
-rw-r--r--lib/tasks/monsterfork.rake2
2 files changed, 3 insertions, 3 deletions
diff --git a/app/helpers/text_helper.rb b/app/helpers/text_helper.rb
index 61a08abe4..a0133be53 100644
--- a/app/helpers/text_helper.rb
+++ b/app/helpers/text_helper.rb
@@ -32,7 +32,7 @@ module TextHelper
     "#{tags.join(' ')}\n#{t.lstrip}".strip.unaccent_via_split_map
   end
 
-  def normalize_status(status, cache: false, skip_cache: true)
-    normalize_text("#{status.tags.pluck(:name).join(' ')}\n#{status.spoiler_text}\n#{status.local? ? Formatter.instance.format(status, skip_cache: skip_cache, cache: cache) : status.text}")
+  def normalize_status(status)
+    normalize_text("#{status.tags.pluck(:name).join(' ')}\n#{status.spoiler_text}\n#{status.local? ? Formatter.instance.format(status, skip_cache: true, cache: false) : status.text}")
   end
 end
diff --git a/lib/tasks/monsterfork.rake b/lib/tasks/monsterfork.rake
index 00a0eaedb..659573358 100644
--- a/lib/tasks/monsterfork.rake
+++ b/lib/tasks/monsterfork.rake
@@ -13,7 +13,7 @@ namespace :monsterfork do
         statuses.each do |s|
           begin
             next if s.destroyed?
-            s.update_column(:normalized_text, normalize_status(s, cache: false))
+            s.update_column(:normalized_text, normalize_status(s))
           rescue rescue ActiveRecord::RecordNotFound
             true
           end