diff --git a/app/models/concerns/alegre_v2.rb b/app/models/concerns/alegre_v2.rb index 6ea4fab5de..247dbd7bc6 100644 --- a/app/models/concerns/alegre_v2.rb +++ b/app/models/concerns/alegre_v2.rb @@ -432,7 +432,7 @@ def is_cached_data_not_good(cached_data) def wait_for_results(project_media, args) return {} if similarity_disabled_for_project_media?(project_media) cached_data = get_cached_data(get_required_keys(project_media, nil)) - timeout = args[:timeout] || 60 + timeout = args[:timeout] || CheckConfig.get('alegre_timeout', 120, :integer).to_f start_time = Time.now while start_time + timeout > Time.now && is_cached_data_not_good(cached_data) #more robust for any type of null response sleep(1) diff --git a/config/config.yml.example b/config/config.yml.example index e34a778e2c..691cd71933 100644 --- a/config/config.yml.example +++ b/config/config.yml.example @@ -45,6 +45,7 @@ development: &default similarity_media_file_url_host: '' min_number_of_words_for_tipline_submit_shortcut: 10 nlu_disambiguation_threshold: 0.11 + alegre_timeout: 120 # Localization #