Azure / azure-storage-python

Microsoft Azure Storage Library for Python
https://azure-storage.readthedocs.io
MIT License
339 stars 241 forks source link

FeatureRequest: ability to set retry option in storage #489

Closed janhaviagrawal closed 6 years ago

janhaviagrawal commented 6 years ago

Which service(blob, file, queue) does this issue concern?

queue

Which version of the SDK was used? Please provide the output of pip freeze.

azure-storage==0.36.0

What problem was encountered?

No option to set the RetryOptions for QueueService object. QueueService inherits from StorageClient class which has retry set to default ExponentialRetry in its init. In pydocumentdb, we can set RetryOptions as property of client's connection policy. It would be great if that could be unified across storage service as well.

Have you found a mitigation/solution?

No.

Note: for table service, please post the issue here instead: https://github.com/Azure/azure-cosmosdb-python.

zezha-msft commented 6 years ago

Hi @janhaviagrawal, thanks for reaching out!

Please refer to this sample on how to set retry policies.

I see that you are using the deprecated monolithic version of the Storage SDK. I would like to suggest you to upgrade to the latest azure-storage-queue package. Here is the download instructions.