mirror of
https://github.com/rclone/rclone.git
synced 2024-11-22 22:22:21 +08:00
azureblob: wait for up to 60s to create a just deleted container
When a container is deleted, a container with the same name cannot be created for at least 30 seconds; the container may not be available for more than 30 seconds if the service is still processing the request. We sleep so that we wait at most 60 seconds. This is mostly useful in the integration tests where containers get deleted and remade immediately.
This commit is contained in:
parent
5fe3b0ad71
commit
8b8220c4f7
|
@ -706,6 +706,11 @@ func (f *Fs) Mkdir(dir string) error {
|
|||
f.containerOK = true
|
||||
return false, nil
|
||||
case azblob.ServiceCodeContainerBeingDeleted:
|
||||
// From https://docs.microsoft.com/en-us/rest/api/storageservices/delete-container
|
||||
// When a container is deleted, a container with the same name cannot be created
|
||||
// for at least 30 seconds; the container may not be available for more than 30
|
||||
// seconds if the service is still processing the request.
|
||||
time.Sleep(6 * time.Second) // default 10 retries will be 60 seconds
|
||||
f.containerDeleted = true
|
||||
return true, err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user