A platform for community discussion. Free, open, simple.
DEV: In test, if flush is called and there is no thread, flush inline (#21426)
Samac0673d29e6b
diff --git a/app/models/concerns/cached_counting.rb b/app/models/concerns/cached_counting.rbindex 1e2e84f0c25..1080fce9123 100644--- a/app/models/concerns/cached_counting.rb+++ b/app/models/concerns/cached_counting.rb@@ -83,10 +83,13 @@ module CachedCountingenddef self.flush- if @thread+ if @thread && @thread.alive?@flush = true@thread.wakeupsleep 0.001 while @flush+ else+ flush_in_memory+ flush_to_dbendend