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

Improve resiliency when ES is not up-to-date #1063

Closed
davidbgk opened this issue Jul 30, 2017 · 1 comment · Fixed by #1066
Closed

Improve resiliency when ES is not up-to-date #1063

davidbgk opened this issue Jul 30, 2017 · 1 comment · Fixed by #1066
Assignees
Labels
Milestone

Comments

@davidbgk
Copy link
Member

When there is an issue related to tasks and ES indexation is lagging behind, we should not crash on latest datasets display.

See: https://sentry.data.gouv.fr/etalab/www-datagouvfr/issues/126047/

Involved pages:

Possible Implementation

Check that the response contains valid datasets, not a list of empty dicts:

u'datasets': <Response: [{}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}, {}]>

Otherwise when we call the url template tag on empty dicts it crashes.

@noirbizarre
Copy link
Contributor

noirbizarre commented Jul 31, 2017

Some details/explanations:
It only fail in one case: when an object has been deleted and not deindexed yet.
This is why it only fail when putting the latest in first when one has been deleted.
Most often, a cas of moderation, after the dataset has been purge and before the deindexation is done

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

Successfully merging a pull request may close this issue.

2 participants