Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added fallback server option #1572

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Commits on Nov 4, 2022

  1. Added fallback server option

    As the main server seems to be having some issues, I've added an option to use a fallback server when the main one fails.
    
    This defaults to "" (undefined) in the config, with users being able to set the URL below the standard URL option in options.
    
    If you've got testingServer set, this is overridden, and the form is removed from the options.
    
    How it works:
    
    Upon requesting sponsors, if the main server fails, we call retryFetch to try again. As we keep note of how many times we retry, we use the fallback server on every even retry, so it flips back and forth.
    
    The delay between retries has also been adjusted. 404 is the same, but if we've failed 2 or less times, we retry instantly, before going back to the previous delay setting.
    
    As most users are only concerned about fetching sponsors, we don't use the fallback server for requests regarding submitting data.
    
    We also only use the fallback server on asyncRequestToServer() calls, as nothing using the synchronous method would benefit.
    lewisdoesstuff committed Nov 4, 2022
    Configuration menu
    Copy the full SHA
    c533839 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    43b3e17 View commit details
    Browse the repository at this point in the history

Commits on Nov 7, 2022

  1. Configuration menu
    Copy the full SHA
    47f2073 View commit details
    Browse the repository at this point in the history