pasqal-io / pasqal-cloud

Apache License 2.0
14 stars 1 forks source link

Add retries when one request returns a 500 while waiting for results (workloads/batches/jobs) #110

Open MatthieuMoreau0 opened 7 months ago

MatthieuMoreau0 commented 7 months ago

When using the wait argument, we poll the API every couple of seconds. That polling can span over minutes (even hours).

However as of now, if a single request fails the loop is interrupted and the user receives an error message. Transient network do happen and we wish the SDK were more resilient to them.

Let's retry a couple times (with exponential backoff) in case of 500 responses or HTTP timeouts when polling for the batch/job/workload results.