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

feat: use invidious api to get healthy instances #571

Merged
merged 9 commits into from Sep 9, 2022

Conversation

BSGalvan
Copy link
Contributor

@BSGalvan BSGalvan commented Sep 8, 2022

Should fix #570.
Quick and dirty implementation of the process explained in the issue above.
I am not well versed with jq, so this might be a roundabout manner of doing what needs to be done!

TODO: need to implement logic for staleness of the cached instance list.

ytfzf Outdated Show resolved Hide resolved
ytfzf Outdated Show resolved Hide resolved
ytfzf Outdated Show resolved Hide resolved
ytfzf Outdated Show resolved Hide resolved
- The instance selection and caching code is now in the Post opt scrape
  section. The logic for this change is as follows:
  "_If the user sets `instances_file` or `cache_dir` in their config,
  the file will be in the wrong place because the config is read after
  creating the file._"

- Additionally, code now sets `invidious_instance` only if it isn't
  already set.
ytfzf Show resolved Hide resolved
Code now fails, with proper error messages, if cURL encounters errors
while fetching `instance_list`.
This is necessary so that the code doesn't simply write out an empty
`instance_list`. In the worst case scenario, it could even replace a
previously usable `instance_list` with an empty one!

Additionally, a nice status message informs the user what is going on.
ytfzf Outdated Show resolved Hide resolved
@Euro20179
Copy link
Collaborator

Nice work!

@Euro20179 Euro20179 merged commit d2d0ea3 into pystardust:development Sep 9, 2022
@BSGalvan
Copy link
Contributor Author

BSGalvan commented Sep 9, 2022

Thank you for all the help as well!

@BSGalvan BSGalvan deleted the development branch October 6, 2022 12:18
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.

None yet

2 participants