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

Network monitoring refactor #1079

Merged
merged 3 commits into from
Aug 11, 2023
Merged

Network monitoring refactor #1079

merged 3 commits into from
Aug 11, 2023

Conversation

revam
Copy link
Member

@revam revam commented Aug 10, 2023

  • Added a new service to the plugin abstraction to monitor network
    availability (IConnectivityService). You can use it to check
    the current network availability, add an event handler to get
    updates when the availability changed, and to check if we're
    currently HTTP/UDP banned (all through the plugin abstraction!).

  • Added a new enum (NetworkAvailability) for the network
    connectivity state. Possible states are;

    • No Interfaces — No interfaces were found.

    • No Gateways — No gateways were found.

    • Local Only — LAN is available, the Internet is not.

    • Partial Internet — Some Internet services are reachable.

    • Internet — All Internet services are reachable.

  • Added a new SignalR event stream ("network") to subscribe to for
    the current network availability and any changes to the network
    availability.

  • Refactored the connectivity monitor job track both LAN and WAN
    availability.

  • Fixed up the queue items disabled status in the v3 API.

  • Add network monitoring to the queues, so any queue commands that
    requires internet access will now wait until the internet is available
    before running.

  • Added a command to forcefully get anime online, and made it so the
    normal get anime command will try to run under normal conditions, but
    schedule a force command if it's unable to get the anime.

  • Small update to the TvDB helper so it will only try to update the
    series when linking if network access is available, otherwise it will
    schedule an update for later.

  • Switched the WAN connectivity monitors to log at the trace level
    leading to less spam in the log files (though they will still appear
    on the console for docker users).

  • Removed some outdated usage of an older sentry DSN, and updated
    the ASP.NET Sentry middleware to a) conditionally be activated
    based on the user's preference, and b) updated it to the correct
    settings.

  • Notify any of the queues that have commands left that they can start
    again if they're waiting by making them re-announce their queue count.

revam added 3 commits August 10, 2023 09:58
- Added a new service to the plugin abstraction to monitor network
  availability (`IConnectivityService`). You can use it to check
  the current network availability, add an event handler to get
  updates when the availability changed, and to check if we're
  currently HTTP/UDP banned (all through the plugin abstraction!).

- Added a new enum (`NetworkAvailability`) for the network
  connectivity state. Possible states are;

  `-` No Interfaces — No interfaces were found.

  `-` No Gateways — No gateways were found.

  `-` Local Only — LAN is available, the Internet is not.

  `-` Partial Internet — Some Internet services are reachable.

  `-` Internet — All Internet services are reachable.

- Added a new SignalR event stream (`"network"`) to subscribe to for
  the current network availability and any changes to the network
  availability.

- Refactored the connectivity monitor job track both LAN and WAN
  availability.

- Fixed up the queue items disabled status in the v3 API.

- Add network monitoring to the queues, so any queue commands that
  requires internet access will now wait until the internet is available
  before running.

- Added a command to forcefully get anime online, and made it so the
  normal get anime command will try to run under normal conditions, but
  schedule a force command if it's unable to get the anime.

- Small update to the TvDB helper so it will only try to update the
  series when linking if network access is available, otherwise it will
  schedule an update for later.

- Switched the WAN connectivity monitors to log at the trace level
  leading to less spam in the log files (though they will still appear
  on the console for docker users).
- Removed some outdated usage of an older sentry DSN, and updated
  the ASP.NET Sentry middleware to a) conditionally be activated
  based on the user's preference, and b) updated it to the correct
  settings.
- Notify any of the queues that have commands left that they can start
  again if they're waiting by making them re-announce their queue count.
@revam revam marked this pull request as ready for review August 10, 2023 08:14
@revam revam requested a review from da3dsoul August 10, 2023 08:14
@revam revam merged commit 36f2a81 into master Aug 11, 2023
@revam revam deleted the network-monitoring-refactor branch August 11, 2023 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant