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

Re-attempt censorship settings on query #75

Merged
merged 5 commits into from
Mar 27, 2024
Merged

Conversation

gsfk
Copy link
Member

@gsfk gsfk commented Mar 25, 2024

Adds code to re-attempt retrieving censorship settings from katsu.

Beacon calls katsu at startup for censorship settings, but currently fails permanently after a set number of retries. This pr adds code to re-attempt retrieving censorship settings whenever a query is made, if censorship settings are missing. The number of retries at startup is also lowered.

At some point we may decide that retrieving at startup is no longer necessary, and use the query-driven system only.

@gsfk gsfk marked this pull request as ready for review March 26, 2024 12:27
@gsfk gsfk requested a review from davidlougheed March 27, 2024 12:39


# saves settings to config as a side effect
def censorship_retry():
Copy link
Member

Choose a reason for hiding this comment

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

would be nice to have return type hints on this function and the two below (tuple[int | None, int | None], int | None), but otherwise this PR looks good

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks... I've started adding these incrementally where they're helpful

@gsfk gsfk merged commit b13e248 into master Mar 27, 2024
1 check passed
@gsfk gsfk deleted the persist-censorship-functional branch April 15, 2024 18:53
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.

2 participants