This repository has been archived on 2023-03-18. You can view files and clone it, but cannot push or open issues or pull requests.
osr-discourse-src/lib
Sam ded84a4b58 PERF: improve performance once logged in rate limiter hits
If "logged in" is being forced anonymous on certain routes, trigger
the protection for any requests that spend 50ms queueing

This means that ...

1. You need to trip it by having 3 requests take longer than 1 second in 10 second interval
2. Once tripped, if your route is still spending 50m queueuing it will continue to be protected

This means that site will continue to function with almost no delays while it is scaling up to handle the new load
2018-04-23 11:55:25 +10:00
..
active_record/connection_adapters Expose replica_postgresql_connection to ActiveRecord::Base. 2017-11-24 09:35:45 +08:00
auth Prefer to use primary email for new user creation over other available emails 2018-03-19 17:10:35 +05:30
autospec Switch to chrome headless mode instead of phantomjs. 2017-12-19 16:00:43 +08:00
backup_restore FIX: Restorer wasn't rolling back if restore fails. 2018-04-06 09:43:32 +08:00
common_passwords fix build & add migration to clear common passwords cache 2016-03-03 19:39:22 +01:00
demon demo script for demonizing using fork exec 2018-01-11 13:51:52 +11:00
email Extract signatures from emails sent with Newton 2018-04-19 12:39:55 +02:00
emoji FEATURES: updates emojis and adds support for more women emojis! 2018-03-22 11:08:06 +01:00
es6_module_transpiler FEATURE: Use Glimmer compiler for widget templates 2017-09-01 09:28:16 -04:00
file_store FIX: cache_file storage cleanup logic was wrong 2018-01-18 17:00:04 +01:00
freedom_patches FEATURE: protect against accidental column or table drops 2018-03-21 15:43:32 +11:00
guardian SECURITY: escape HTML entities from topic title 2018-04-15 18:44:28 +05:30
highlight_js update highlight.js to 9.12.0 2017-07-05 11:12:10 +02:00
i18n FEATURE: Allow plugins to register a new locale 2018-01-25 14:57:41 +01:00
import Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
import_export Remove use of rescue nil. 2018-04-02 13:52:51 +08:00
javascripts Correct Arabic month names 2018-01-14 20:01:45 +01:00
middleware PERF: improve performance once logged in rate limiter hits 2018-04-23 11:55:25 +10:00
migration Call on_drop only when tables/columns are dropped 2018-03-27 13:18:13 +11:00
onebox FIX: local post onebox was always pointing to 1st post 2018-02-26 16:05:35 +01:00
plugin Mark discourse-voting and discourse-staff-notes as official. 2018-04-23 09:26:13 +08:00
pretty_text FEATURE: Add quote-modified class if a quote has been modified 2018-03-13 13:41:06 -04:00
rate_limiter FIX: regression around rate limiter 2017-12-04 21:44:16 +11:00
scheduler PERF: stop running background work between requests 2017-11-23 15:48:47 +11:00
search FEATURE: show tags in search results 2017-08-25 11:52:59 -04:00
sidekiq FEATURE: raise an event when a sidekiq job runs 2017-10-23 17:30:17 +11:00
site_settings PERF: Only save site setting if values have been changed. 2018-04-17 21:07:39 +08:00
stylesheet correct typo 2018-04-23 10:55:38 +10:00
tasks sleep here is a better fit 2018-04-11 16:46:27 +10:00
theme_store FIX: unable to import private themes due to key checking 2018-04-03 16:11:03 +10:00
validators FIX: create upload record for exported csv files 2018-04-20 00:27:49 +05:30
wizard FIX: staff count on invites step of wizard should only include real users 2017-08-14 22:17:41 -04:00
admin_confirmation.rb SECURITY: Confirm new administrator accounts via email 2017-04-04 15:59:01 -04:00
admin_constraint.rb Add extensibility to admin constraints 2018-01-25 13:56:08 -05:00
admin_user_index_query.rb UX: Allow users to filter members on group page. 2018-03-22 14:02:41 +08:00
age_words.rb reused value of Time.now in a method 2015-12-01 21:06:37 +00:00
archetype.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
auth.rb Added Instagram login method 2016-02-25 12:13:59 +10:00
avatar_lookup.rb Remove irrelevant comment. 2017-09-08 14:07:24 +08:00
badge_queries.rb FEATURE: Support an end date for user silencing 2017-11-14 13:20:19 -05:00
base62.rb remove constant warning in base62 file 2018-01-19 19:52:42 +01:00
cache.rb Fix all the errors to get our tests green on Rails 5.1. 2017-09-25 13:48:58 +08:00
canonical_url.rb FIX: absolute canonical link on topic pages 2013-12-12 17:24:00 +01:00
category_badge.rb FIX: Category badge style of none was causing errors when rendering 2017-08-24 13:45:32 -04:00
comment_migration.rb Fix all the errors to get our tests green on Rails 5.1. 2017-09-25 13:48:58 +08:00
composer_messages_finder.rb REFACTOR: Use Topic#private_message? to reduce duplication. 2018-03-05 15:39:22 +08:00
configurable_urls.rb Don't blow up if Redis switches to READONLY 2015-04-24 14:37:16 -04:00
content_buffer.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
cooked_post_processor.rb FIX: respect nofollow settings for onebox links 2018-03-26 18:21:16 +05:30
crawler_detection.rb FEATURE: control which web crawlers can access using a whitelist or blacklist 2018-03-22 15:41:02 -04:00
current_user.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
custom_renderer.rb Initial release of Discourse 2013-02-05 14:16:51 -05:00
custom_setting_providers.rb Plugins can register providers for global settings 2017-01-09 17:18:58 -05:00
db_helper.rb FEATURE: move migrate_to_new_scheme into a background job 2015-06-12 12:07:57 +02:00
directory_helper.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
discourse_cookie_store.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
discourse_diff.rb FIX: don't add diff classes more than once 2018-04-16 15:41:45 +02:00
discourse_event.rb Remove stubs on DiscourseEvent in tests. 2017-06-01 16:21:00 +09:00
discourse_hub.rb DEV: private means nothing for class methods 2017-11-01 16:43:19 +11:00
discourse_iife.rb Allow the loader to understand when files are moved 2016-11-15 11:41:16 -05:00
discourse_logstash_logger.rb FIX: Incorrect formatter used when logstash formatter is enabled. 2018-04-17 12:07:52 +08:00
discourse_plugin_registry.rb FEATURE: adds support for loading existing core asset in pretty text 2018-04-10 08:37:16 +02:00
discourse_plugin.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
discourse_redis.rb $redis.client -> $redis._client. 2018-04-20 13:01:17 +08:00
discourse_tagging.rb FEATURE: move staff tags setting to tag group settings 2018-04-20 15:34:23 -04:00
discourse_updates.rb REFACTOR: Avoid duplicated logic on server and client. 2017-11-21 17:10:04 +08:00
discourse.rb $redis.client -> $redis._client. 2018-04-20 13:01:17 +08:00
disk_space.rb FIX: Allow for large free disk space 2016-01-25 13:22:36 +11:00
distributed_cache.rb Allow DistributedCache#delete to not publish changes. 2017-10-20 23:03:42 +08:00
distributed_memoizer.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
distributed_mutex.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
edit_rate_limiter.rb Add better error messages for rate limits. 2015-09-24 13:52:46 -04:00
email_backup_token.rb FEATURE: further restrict downloading of backups 2017-03-01 08:28:34 -07:00
email_cook.rb replace indentation with non-breaking spaces when cooking emails 2017-11-18 17:16:44 +01:00
email_updater.rb FIX: Don't skip validations when updating user's email. 2017-11-08 11:38:51 +08:00
email.rb Upgrade mail gem to remove dependency on mime-types. 2018-03-14 14:37:55 +08:00
enum_site_setting.rb Enum site settings can have translatable names in dropdown. Add setting for how often users get digest emails by default: default_digest_email_frequency. 2013-08-23 17:36:25 -04:00
enum.rb Enums that are used in tables need to be stable 2016-01-08 20:43:11 +05:30
excerpt_parser.rb FIX: Calculation of text length for <details> in excerpt was wrong 2018-03-12 16:55:23 +01:00
feed_element_installer.rb FEATURE: Replace SimpleRSS with Ruby RSS module (#5311) 2017-12-06 10:45:09 +11:00
feed_item_accessor.rb FEATURE: Replace SimpleRSS with Ruby RSS module (#5311) 2017-12-06 10:45:09 +11:00
file_helper.rb FIX: don't double request when downloading a file 2018-02-24 12:35:57 +01:00
filter_best_posts.rb PERF: Remove Object#present? check introduced in e0d5d9670a. 2017-09-07 21:36:27 +08:00
final_destination.rb Remove use of rescue nil. 2018-04-02 13:52:51 +08:00
flag_query.rb FEATURE: Show the current reply count of the flagged post 2018-04-05 14:03:02 +02:00
flag_settings.rb Refactor flag types for more customization 2017-10-19 13:55:23 -04:00
gaps.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
global_path.rb FEATURE: allow specifying s3 config via globals 2017-10-06 16:20:01 +11:00
guardian.rb UX: user preferences allows users to choose which title to use from their badges and groups 2018-04-06 14:34:36 -04:00
has_errors.rb Add PostCreator#create!. 2016-07-15 11:36:06 +08:00
headless-ember.js JSHint headless-ember 2014-03-11 03:18:57 -04:00
hijack.rb FEATURE: detect when client thinks user is logged on but is not 2018-03-06 16:49:31 +11:00
homepage_constraint.rb FEATURE: Allow the user to select a custom home page (#5268) 2017-11-10 06:45:19 +11:00
html_prettify.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
html_to_markdown.rb FIX: handle <pre> inside <blockquote> in html_to_markdown 2018-02-26 23:28:02 +01:00
image_sizer.rb FIX: cropping GIF wasn't working 2016-07-27 18:48:02 +02:00
inline_oneboxer.rb Remove use of rescue nil. 2018-04-02 13:52:51 +08:00
introduction_updater.rb Add new welcome message step 2016-09-22 09:52:19 -04:00
ip_addr.rb Replace certain uses of 'gsub' with 'tr' or 'chomp' for a speed 2016-06-10 22:08:37 -05:00
js_locale_helper.rb Add wizard_js to translations that can be overridden from a plugin 2018-04-06 11:34:25 +02:00
json_error.rb FEATURE: View flags grouped by topic 2017-09-25 12:25:14 -04:00
letter_avatar.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
markdown_linker.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
mem_info.rb do not pull hotlinked images when max_image_size_kb == 0 2013-11-13 17:30:48 +01:00
memory_diagnostics.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
message_bus_diags.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
method_profiler.rb FIX: stop double counting net calls in logs 2018-02-28 10:45:11 +11:00
mobile_detection.rb radically simplify our mobile user agent detection 2016-03-26 02:02:23 -07:00
new_post_manager.rb FEATURE: Staged user moderation (#5721) 2018-04-06 11:41:25 +02:00
new_post_result.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
notification_levels.rb Server side code for Watching First Post Only 2016-07-07 11:21:50 -04:00
oneboxer.rb FIX: non-oneboxed links on separate lines should stay on separate lines 2018-04-11 21:33:45 +02:00
onpdiff.rb add onpdiff tests 2013-12-16 18:39:49 +01:00
pbkdf2.rb more prep work for jRuby 2018-02-26 10:25:58 +11:00
permalink_constraint.rb FIX: permalink normalization not applied at constraint 2015-07-22 13:40:45 +10:00
pinned_check.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
plain_text_to_markdown.rb FEATURE: convert plain text emails to markdown 2017-12-06 01:47:51 +01:00
plugin_gem.rb Add some more debugging information when a plugin can't find a gem 2017-08-02 14:00:18 -04:00
post_action_creator.rb PERF: Avoid calling expensive PostGuardian#can_see_post? multiple times. 2017-09-08 14:07:24 +08:00
post_creator.rb move topic excerpt code to one method to DRY it up and for extensibility 2018-04-17 15:08:21 -04:00
post_destroyer.rb FEATURE: add staff action log for 'restore topic' 2018-03-21 18:04:13 +05:30
post_enqueuer.rb FIX: When approving/rejecting a post it should delete the user action 2015-04-24 15:25:47 -04:00
post_jobs_enqueuer.rb FEATURE: Live updates for user's messages page. 2018-03-06 18:15:21 +08:00
post_locker.rb FEATURE: Staff members can lock posts 2018-01-26 14:01:30 -05:00
post_merger.rb FIX: Revised post not updated correctly when merging posts. 2016-08-11 09:01:54 +08:00
post_revisor.rb move topic excerpt code to one method to DRY it up and for extensibility 2018-04-17 15:08:21 -04:00
pretty_text.rb FEATURE: adds support for loading existing core asset in pretty text 2018-04-10 08:37:16 +02:00
primary_group_lookup.rb PERF: Remove N+1 query when generating posters summary. 2017-09-14 12:07:35 +08:00
promotion.rb FIX: Group can't be deleted if certain users are demoted. 2018-04-10 14:19:35 +08:00
quote_comparer.rb FEATURE: Add quote-modified class if a quote has been modified 2018-03-13 13:41:06 -04:00
rate_limiter.rb FEATURE: if site is under extreme load show anon view 2018-04-18 16:58:57 +10:00
retrieve_title.rb FIX: inline oneboxer min title length of 2 2018-01-30 08:40:04 +11:00
route_format.rb FIX: RouteFormat is a better class name than RouteFormats 2017-12-21 15:30:32 -05:00
rtl.rb DEV: Move RTL into lib where it belongs 2017-07-03 15:26:57 -04:00
s3_helper.rb FIX: error setting tombstone bucket when set to old version 2017-11-13 15:36:45 +11:00
score_calculator.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
screening_model.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
search.rb FEATURE: search within title using in:title 2018-02-20 14:41:21 +11:00
secure_session.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
single_sign_on.rb FEATURE: Add option to have sso synchronize group membership 2018-04-10 13:17:23 +10:00
site_setting_extension.rb FIX: make get_hostname more lenient to user input 2018-04-12 17:09:09 +02:00
slug.rb FIX: strip emoji string from slug 2018-04-18 11:32:32 +05:30
socket_server.rb Remove use of rescue nil. 2018-04-02 13:52:51 +08:00
source_url.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
spam_handler.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
sql_builder.rb Fix all the errors to get our tests green on Rails 5.1. 2017-09-25 13:48:58 +08:00
staff_constraint.rb Extensibility for custom staff check 2018-03-28 14:48:14 -04:00
staff_message_format.rb More extensibility for custom silence/suspend messages 2018-01-19 11:35:19 -05:00
stats_socket.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
suggested_topics_builder.rb Avoid allocating an extra array. 2017-09-08 14:07:24 +08:00
system_message.rb Convert server side paths to use /u/ 2017-03-30 10:23:24 -04:00
text_cleaner.rb FIX: strip zero width spaces from topic title 2018-02-21 00:12:39 +05:30
text_sentinel.rb rename 'min_private_message_{post/title}_length' to 'min_personal_message_{post/title}_length' 2018-02-01 13:25:29 +05:30
theme_settings_manager.rb FEATURE: Theme settings (2) (#5611) 2018-03-04 19:04:23 -05:00
theme_settings_parser.rb FEATURE: Theme settings (2) (#5611) 2018-03-04 19:04:23 -05:00
timeline_lookup.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
topic_creator.rb add client side validation for category minimum_required_tags 2018-04-11 07:17:52 +05:30
topic_list_responder.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
topic_publisher.rb FIX: Update last_version_at when publishing 2018-03-26 16:06:20 -04:00
topic_query_sql.rb FEATURE: digests choose topics you're watching or tracking first 2016-08-18 17:16:52 -04:00
topic_query.rb FIX: Shared draft performance fix + missing avatars 2018-03-28 16:11:43 -04:00
topic_retriever.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
topic_subtype.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
topic_view.rb Add support for the '/p/:post_id' route on the client-side 2018-03-24 02:44:39 +01:00
topics_bulk_action.rb FEATURE: Live updates for user's messages page. 2018-03-06 18:15:21 +08:00
trust_level.rb FIX: admin trust level user list URL should be consistent with new naming 2015-11-23 14:28:56 +05:30
twitter_api.rb UX: wrap full-size Twitter onebox images in aspect-ratio 2018-03-23 18:25:04 +05:30
unread.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00
upload_creator.rb FIX: create upload record for exported csv files 2018-04-20 00:27:49 +05:30
url_helper.rb Move escape_uri method to a more suitable place 2017-12-12 20:17:46 +01:00
user_name_suggester.rb FIX: suggested username should not be more than setting max_username_length 2017-03-29 18:19:28 +05:30
version.rb Version bump to v2.0.0.beta6 2018-04-13 10:47:01 -04:00
wizard.rb Add rubocop to our build. (#5004) 2017-07-28 10:20:09 +09:00