Skip to content

ENH: Exponential backoff retry strategy  #449

Closed
@Gui-FernandesBR

Description

@Gui-FernandesBR

Is your feature request related to a problem? Please describe.

Currently the Environment class practices a bad retry by iterating inside a while loop to catch API response within a certain number of maximum attempts. This can be problematic because the user can get blocked by the server or the API may not have enough time to process the new request after . A good standard is to apply exponential backoff, meaning that the execution will give longer pauses as the number of attempts increases.

  • Dedicated python libraries may be considered. I'm leaving here two alternatives: https://pypi.org/project/backoff/ and https://stackoverflow.com/a/35636367/19971645
  • I'm not against being a bit more verbose with those API recalls. I'd like to know what is happening when trying to retrieve data from te different APIs
  • Implementing such features would let the code safer and more reliable.
  • I found 6 occurrences of such problem within the Environment class.

Additional context

Metadata

Metadata

Labels

EnhancementNew feature or request, including adjustments in current codesEnvironmentEnviroment Class related featuresGood first issueGood for newcomers

Type

No type

Projects

  • Status

    Closed

Relationships

None yet

Development

No branches or pull requests

Issue actions