Revert "PERF: Call web hook events in a new thread (#7451)" (#7456)

Revert “PERF: Call web hook events in a new thread (#7451)” (#7456)

This reverts commit 09ae12bd5d9e46d5596f66dc1ba4d6d1d4092561.

diff --git a/lib/discourse_event.rb b/lib/discourse_event.rb
index b9942e8..c61a70b 100644
--- a/lib/discourse_event.rb
+++ b/lib/discourse_event.rb
@@ -1,13 +1,6 @@
 # This is meant to be used by plugins to trigger and listen to events
 # So we can execute code when things happen.
 class DiscourseEvent
-  def self.async
-    @async ||= !Rails.env.test?
-  end
-
-  def self.async=(val)
-    @async = val
-  end
 
   # Defaults to a hash where default values are empty sets.
   def self.events
@@ -15,14 +8,6 @@ class DiscourseEvent
   end
 
   def self.trigger(event_name, *params)
-    if async
-      Thread.new { call_events(event_name, *params) }
-    else
-      call_events(event_name, *params)
-    end
-  end
-
-  def self.call_events(event_name, *params)
     events[event_name].each do |event|
       event.call(*params)
     end

GitHub sha: 7afc3642

Sorry my bad … did a merge by mistake.