From 03923690dbe8a42a35dee0aafa065a1bb83ba923 Mon Sep 17 00:00:00 2001 From: gms-gs Date: Wed, 20 Nov 2024 13:34:57 +0000 Subject: [PATCH] Move SiteSetting class to lib dir --- app/models/site_setting.rb | 13 ------------- lib/find/site_setting.rb | 13 +++++++++++++ 2 files changed, 13 insertions(+), 13 deletions(-) delete mode 100644 app/models/site_setting.rb create mode 100644 lib/find/site_setting.rb diff --git a/app/models/site_setting.rb b/app/models/site_setting.rb deleted file mode 100644 index 36d57120d8..0000000000 --- a/app/models/site_setting.rb +++ /dev/null @@ -1,13 +0,0 @@ -# frozen_string_literal: true - -require './config/initializers/redis' - -class SiteSetting < ApplicationRecord - def self.cycle_schedule - RedisClient.current.get('cycle_schedule')&.to_sym || :real - end - - def self.set(name:, value:) - RedisClient.current.set(name, value) - end -end diff --git a/lib/find/site_setting.rb b/lib/find/site_setting.rb new file mode 100644 index 0000000000..3404baa93e --- /dev/null +++ b/lib/find/site_setting.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +module Find + class SiteSetting + def self.cycle_schedule + RedisClient.current.get('cycle_schedule')&.to_sym || :real + end + + def self.set(name:, value:) + RedisClient.current.set(name, value) + end + end +end