Make the previously-slow query target feed query configurable. Default to on

This commit is contained in:
Seth Call 2024-10-14 11:18:50 -05:00
parent 3c3ea6cbba
commit 5831e7d709
4 changed files with 11 additions and 3 deletions

View File

@ -131,7 +131,7 @@ module JamAdmin
config.email_smtp_starttls_auto = true
config.verify_email_enabled = false
config.musician_count = '200,000+'
config.musician_count = '300,000+'
config.facebook_app_id = ENV['FACEBOOK_APP_ID'] || '468555793186398'
config.facebook_app_secret = ENV['FACEBOOK_APP_SECRET'] || '546a5b253972f3e2e8b36d9a3dd5a06e'

View File

@ -31,9 +31,12 @@ module JamRuby
target_user = params[:user]
target_band = params[:band]
# TODO: SPEED UP QUERY. CURRENTLY TAKES FOR EVER.
if target_user or target_band
return { query: [], next_page: nil}
if Rails.application.config.targeted_feed_disabled
if target_user or target_band
return { query: [], next_page: nil}
end
end
#query = Feed.includes([:recording]).includes([:music_session]).limit(limit)

View File

@ -82,6 +82,10 @@ def app_config
false
end
def targeted_feed_disabled
false
end
def audiomixer_path
# you can specify full path to audiomixer with AUDIOMIXER_PATH env variable...
# or we check for audiomixer path in the user's workspace

View File

@ -444,6 +444,7 @@ if defined?(Bundler)
}
config.vst_enabled = true
config.midi_enabled = true
config.targeted_feed_disabled = false
config.verify_email_enabled = false
config.kickbox_api_key = 'e262991e292dd5fe382c4a69f2b359f718cf267712b8684c9c28d6402ec18965'
config.check_bounced_emails = false