mirror of
https://github.com/discourse/discourse.git
synced 2026-08-09 12:38:21 -05:00
FEATURE: when under extreme load disable search
The global setting disable_search_queue_threshold (DISCOURSE_DISABLE_SEARCH_QUEUE_THRESHOLD) which default to 1 second was added. This protection ensures that when the application is unable to keep up with requests it will simply turn off search till it is not backed up. To disable this protection set this to 0.
This commit is contained in:
@@ -125,6 +125,12 @@
|
||||
{{#if searchActive}}
|
||||
<h3>{{i18n "search.no_results"}}</h3>
|
||||
|
||||
{{#if model.grouped_search_result.error}}
|
||||
<div class="warning">
|
||||
{{model.grouped_search_result.error}}
|
||||
</div>
|
||||
{{/if}}
|
||||
|
||||
{{#if showSuggestion}}
|
||||
<div class="no-results-suggestion">
|
||||
{{i18n "search.cant_find"}}
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
import { popupAjaxError } from "discourse/lib/ajax-error";
|
||||
import { searchForTerm, isValidSearchTerm } from "discourse/lib/search";
|
||||
import { createWidget } from "discourse/widgets/widget";
|
||||
import { h } from "virtual-dom";
|
||||
@@ -78,6 +79,7 @@ const SearchHelper = {
|
||||
searchData.topicId = null;
|
||||
}
|
||||
})
|
||||
.catch(popupAjaxError)
|
||||
.finally(() => {
|
||||
searchData.loading = false;
|
||||
widget.scheduleRerender();
|
||||
|
||||
Reference in New Issue
Block a user