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

Retry when suggested topic has no papers. #33

Merged
merged 1 commit into from
Sep 6, 2024

Conversation

eban12
Copy link
Contributor

@eban12 eban12 commented Sep 5, 2024

If Arxiv returns no papers for the randomly picked topic, it retries for maximum of 10 times. The maxRetries prevents the app form going into an infinite loop incases where all requests return empty list.

@eban12
Copy link
Contributor Author

eban12 commented Sep 5, 2024

This is my attempt at fixing the issue #24. It might not be an elegant solution but it does solve the issue for the time being. A better solution might be to find a way to get a recommended or top papers endpoint from Arxiv api. Which would always be deterministic and guaranteed to return results. But I don't understand the Arxiv api enough to know if there is such an endpoint. Will try to look into it over the weekend or something. @dagmawibabi if you know if such an endpoint exists, let me know.

Copy link
Owner

@dagmawibabi dagmawibabi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@eban12 great job. That's the exact kind of solution I would've had. 👏

@dagmawibabi dagmawibabi merged commit e81fb65 into dagmawibabi:main Sep 6, 2024
1 check failed
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.

Empty list when opening app
2 participants