Skip to content

Add timeout and retry logic to senedd regmem - #259

Open
ajparsons wants to merge 1 commit into
masterfrom
senedd-regmem-timeout
Open

Add timeout and retry logic to senedd regmem#259
ajparsons wants to merge 1 commit into
masterfrom
senedd-regmem-timeout

Conversation

@ajparsons

Copy link
Copy Markdown
Contributor

Sometimes this hangs! This adds some delay and retry logic, and if not, should just fail.

time.sleep(10)
# Get fresh content for the retry
content = requests.get(url, headers=headers).content
content = fetch_url(url)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The while loop is now feching it twice - I don't think this line is needed at all, if the fetch_url is now the first bit of the while

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Also, if fetch_url itself now has a loop, we probably don't want another loop here at all?

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