Thread safety and not try none-working backends (#140)

Co-authored-by: Kevinf100 <12779728+kevinf100@users.noreply.github.com>

commit 0fe9e0a28a
Author: Kevinf100 <12779728+kevinf100@users.noreply.github.com>
Date:   Thu Jun 5 11:41:02 2025 -0400

    More thread safety and speed improvements

commit 54ea7f04fd
Author: Kevinf100 <12779728+kevinf100@users.noreply.github.com>
Date:   Tue Jun 3 23:37:20 2025 -0400

    Many thread safe updates.
    Updating instances timesout after 10 seconds.
    Now waits until checking all instances finishes before starting the timer for next.
    More random debugging logs

commit 4dcd6dd2f4
Author: Kevinf100 <12779728+kevinf100@users.noreply.github.com>
Date:   Tue Jun 3 10:34:56 2025 -0400

    Update API to only try working backends with companion
This commit is contained in:
Kevinf100
2025-06-06 11:04:59 -04:00
committed by Fijxu
parent 3d3321eec0
commit fc1e2fc221
4 changed files with 67 additions and 15 deletions

View File

@@ -4,6 +4,7 @@ class Invidious::Jobs::CheckBackend < Invidious::Jobs::BaseJob
def begin
loop do
LOGGER.info("Backend Checker: Starting")
BackendInfo.check_backends
LOGGER.info("Backend Checker: Done, sleeping for #{CONFIG.check_backends_interval} seconds")
sleep CONFIG.check_backends_interval.seconds