FIX: thread safety for active automation tracking (#27044)

This commit is contained in:
Sam
2024-05-16 13:34:24 +10:00
committed by GitHub
parent 7442cf3f62
commit e90e6e8f86
2 changed files with 16 additions and 2 deletions

View File

@ -30,11 +30,11 @@ module ::DiscourseAutomation
USER_GROUP_MEMBERSHIP_THROUGH_BADGE_BULK_MODIFY_START_COUNT = 1000
def self.set_active_automation(id)
@active_automation_id = id
Thread.current[:active_automation_id] = id
end
def self.get_active_automation
@active_automation_id
Thread.current[:active_automation_id]
end
end