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

Update mirrors DB #12

Closed
rgaudin opened this issue May 30, 2024 · 5 comments · Fixed by #16
Closed

Update mirrors DB #12

rgaudin opened this issue May 30, 2024 · 5 comments · Fixed by #16
Assignees
Labels
enhancement New feature or request
Milestone

Comments

@rgaudin
Copy link
Member

rgaudin commented May 30, 2024

We need to initialize our DB (#6) with mirrors information and we'll also need to update them periodically.
For this, we should rely on the online list of mirrors that we have.

https://download.kiwix.org/mirrors.html

It's in HTML format but all information can be extracted easily.

Let's use the URL's hostname as ID for now and also assume that any DB mirror not found in the page should be marked disabled

@rgaudin rgaudin added the enhancement New feature or request label May 30, 2024
@rgaudin rgaudin added this to the MVP milestone May 30, 2024
@elfkuzco elfkuzco linked a pull request Jun 3, 2024 that will close this issue
@elfkuzco elfkuzco removed a link to a pull request Jun 4, 2024
@elfkuzco
Copy link
Collaborator

elfkuzco commented Jun 4, 2024

What do you think about providing a command line interface for this?

backend update-mirrors 

This way, it can be run externally by an admin or scheduled to be run periodically via cron

@rgaudin
Copy link
Member Author

rgaudin commented Jun 4, 2024

Sure! As long as we also have the ability to run it via code (still not clear how this will be trigered in prod)

@elfkuzco
Copy link
Collaborator

elfkuzco commented Jun 4, 2024

Perhaps, in the code, it can check if there are any rows in the table. If there are none, it will involve the function behind the CLI. Subsequent updates would be done externally or via a scheduler

@rgaudin
Copy link
Member Author

rgaudin commented Jun 4, 2024

👍

@rgaudin
Copy link
Member Author

rgaudin commented Jun 5, 2024

We will need to exclude the israeli mirror (it doesn't have the speedtest file)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants