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

Fix init-countries script #185

Merged
merged 5 commits into from
Jun 24, 2024
Merged

Fix init-countries script #185

merged 5 commits into from
Jun 24, 2024

Conversation

sameh-farouk
Copy link
Member

@sameh-farouk sameh-farouk commented Jun 7, 2024

What's Changed:

  • Recently, we observed that the restcountries.com API was unreliable, so we have decided to self-host the JSON data.
  • The script will now check if the geo data already exists in the database, so the initialization step can be skipped without any issues.
  • If the data does not exist in the DB and an error occurs while fetching or inserting this data, the processor should not start syncing. Instead, we will exit with an error to avoid starting with missing data.
  • Handle partial geo data in DB (on conflict) by updating the entries instead of panicking.

Related Issue:
#181 (comment)

@sameh-farouk sameh-farouk marked this pull request as draft June 7, 2024 01:15
@sameh-farouk sameh-farouk marked this pull request as ready for review June 24, 2024 11:51
@xmonader xmonader merged commit d07f025 into master Jun 24, 2024
1 check passed
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.

3 participants