diff --git a/app/controllers/api/v1/account_by_username_controller.rb b/app/controllers/api/v1/account_by_username_controller.rb index 63a34353..a681a0d8 100644 --- a/app/controllers/api/v1/account_by_username_controller.rb +++ b/app/controllers/api/v1/account_by_username_controller.rb @@ -1,6 +1,6 @@ # frozen_string_literal: true -class Api::V1::AccountByUsernameController < EmptyController +class Api::V1::AccountByUsernameController < API::BaseController before_action :set_account before_action :check_account_suspension before_action :check_account_local diff --git a/app/controllers/api/v1/timelines/home_controller.rb b/app/controllers/api/v1/timelines/home_controller.rb index 9346f9e3..93ad337b 100644 --- a/app/controllers/api/v1/timelines/home_controller.rb +++ b/app/controllers/api/v1/timelines/home_controller.rb @@ -62,6 +62,7 @@ class Api::V1::Timelines::HomeController < Api::BaseController end def regeneration_in_progress? - Redis.current.exists?("account:#{current_account.id}:regeneration") + false + # Redis.current.exists?("account:#{current_account.id}:regeneration") end end diff --git a/app/controllers/settings/preferences_controller.rb b/app/controllers/settings/preferences_controller.rb index 4ce457e3..dbf156ed 100644 --- a/app/controllers/settings/preferences_controller.rb +++ b/app/controllers/settings/preferences_controller.rb @@ -9,7 +9,7 @@ class Settings::PreferencesController < Settings::BaseController def update user_settings.update(user_settings_params.to_h) - current_user.force_regeneration! + # current_user.force_regeneration! if current_user.update(user_params) I18n.locale = current_user.locale diff --git a/app/models/user.rb b/app/models/user.rb index 0bb4784f..64ab183e 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -219,7 +219,7 @@ class User < ApplicationRecord end def challenge - # + # end def password_required? @@ -246,7 +246,7 @@ class User < ApplicationRecord end def force_regeneration! - Redis.current.set("account:#{account_id}:regeneration", true) + # Redis.current.set("account:#{account_id}:regeneration", true) end protected @@ -258,7 +258,7 @@ class User < ApplicationRecord private def set_approved - self.approved = open_registrations? + self.approved = open_registrations? end def external? @@ -283,9 +283,10 @@ class User < ApplicationRecord end def regenerate_feed! - return unless Redis.current.setnx("account:#{account_id}:regeneration", true) - Redis.current.expire("account:#{account_id}:regeneration", 1.day.seconds) - RegenerationWorker.perform_async(account_id) + # return unless Redis.current.setnx("account:#{account_id}:regeneration", true) + # Redis.current.expire("account:#{account_id}:regeneration", 1.day.seconds) + # RegenerationWorker.perform_async(account_id) + return end def needs_feed_update? diff --git a/app/services/precompute_feed_service.rb b/app/services/precompute_feed_service.rb index 076dedac..0d8a083b 100644 --- a/app/services/precompute_feed_service.rb +++ b/app/services/precompute_feed_service.rb @@ -2,8 +2,8 @@ class PrecomputeFeedService < BaseService def call(account) - FeedManager.instance.populate_feed(account) + # FeedManager.instance.populate_feed(account) ensure - Redis.current.del("account:#{account.id}:regeneration") + # Redis.current.del("account:#{account.id}:regeneration") end end