FIX: loop detection works as expected and does not need logging (#31686)

Logging creates impression that something is not working while
everything is working as expected.
This commit is contained in:
Krzysztof Kotlarek
2025-03-07 16:41:29 +11:00
committed by GitHub
parent e87bfad23b
commit 4bb1e0d113

View File

@ -130,12 +130,7 @@ module DiscourseAutomation
def trigger!(context = {})
if enabled
if active_id = DiscourseAutomation.get_active_automation
Rails.logger.warn(<<~TEXT.strip)
[automation] potential automations infinite loop detected: skipping automation #{self.id} because automation #{active_id} is still executing.")
TEXT
return
end
return if active_id = DiscourseAutomation.get_active_automation
begin
DiscourseAutomation.set_active_automation(self.id)