diff options
author | Claire <claire.github-309c@sitedethib.com> | 2022-04-28 19:24:18 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-04-28 19:24:18 +0200 |
commit | 78f7f23ad21359893cb022b7c2f7644d5c22cb43 (patch) | |
tree | 77b919683a8656a361d7d62c8745233bc8b2d310 /app/controllers | |
parent | 6a9d1549484a6fb02d7d01e884577a7185302046 (diff) | |
parent | f23f784f1811a5e7ae82faaf8868e389e9608f5d (diff) |
Merge pull request #1756 from ClearlyClaire/glitch-soc/merge-upstream
Merge upstream changes
Diffstat (limited to 'app/controllers')
-rw-r--r-- | app/controllers/admin/dashboard_controller.rb | 8 | ||||
-rw-r--r-- | app/controllers/media_proxy_controller.rb | 3 | ||||
-rw-r--r-- | app/controllers/settings/exports_controller.rb | 3 |
3 files changed, 9 insertions, 5 deletions
diff --git a/app/controllers/admin/dashboard_controller.rb b/app/controllers/admin/dashboard_controller.rb index e376baab2..da9c6dd16 100644 --- a/app/controllers/admin/dashboard_controller.rb +++ b/app/controllers/admin/dashboard_controller.rb @@ -2,6 +2,8 @@ module Admin class DashboardController < BaseController + include Redisable + def index @system_checks = Admin::SystemCheck.perform @time_period = (29.days.ago.to_date...Time.now.utc.to_date) @@ -15,10 +17,10 @@ module Admin def redis_info @redis_info ||= begin - if Redis.current.is_a?(Redis::Namespace) - Redis.current.redis.info + if redis.is_a?(Redis::Namespace) + redis.redis.info else - Redis.current.info + redis.info end end end diff --git a/app/controllers/media_proxy_controller.rb b/app/controllers/media_proxy_controller.rb index 5596e92d1..d2a4cb207 100644 --- a/app/controllers/media_proxy_controller.rb +++ b/app/controllers/media_proxy_controller.rb @@ -3,6 +3,7 @@ class MediaProxyController < ApplicationController include RoutingHelper include Authorization + include Redisable skip_before_action :store_current_location skip_before_action :require_functional! @@ -45,7 +46,7 @@ class MediaProxyController < ApplicationController end def lock_options - { redis: Redis.current, key: "media_download:#{params[:id]}", autorelease: 15.minutes.seconds } + { redis: redis, key: "media_download:#{params[:id]}", autorelease: 15.minutes.seconds } end def reject_media? diff --git a/app/controllers/settings/exports_controller.rb b/app/controllers/settings/exports_controller.rb index 30138d29e..1638d3412 100644 --- a/app/controllers/settings/exports_controller.rb +++ b/app/controllers/settings/exports_controller.rb @@ -2,6 +2,7 @@ class Settings::ExportsController < Settings::BaseController include Authorization + include Redisable skip_before_action :require_functional! @@ -28,6 +29,6 @@ class Settings::ExportsController < Settings::BaseController end def lock_options - { redis: Redis.current, key: "backup:#{current_user.id}" } + { redis: redis, key: "backup:#{current_user.id}" } end end |