mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-11-09 00:24:46 +08:00
Update weed/replication/sink/azuresink/azure_sink.go
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
This commit is contained in:
@@ -74,10 +74,19 @@ func (g *AzureSink) initialize(accountName, accountKey, container, dir string) e
|
|||||||
}
|
}
|
||||||
|
|
||||||
serviceURL := fmt.Sprintf("https://%s.blob.core.windows.net/", accountName)
|
serviceURL := fmt.Sprintf("https://%s.blob.core.windows.net/", accountName)
|
||||||
client, err := azblob.NewClientWithSharedKeyCredential(serviceURL, credential, nil)
|
client, err := azblob.NewClientWithSharedKeyCredential(serviceURL, credential, &azblob.ClientOptions{
|
||||||
if err != nil {
|
ClientOptions: azcore.ClientOptions{
|
||||||
|
Retry: policy.RetryOptions{
|
||||||
|
MaxRetries: 10,
|
||||||
|
TryTimeout: time.Minute,
|
||||||
|
RetryDelay: 2 * time.Second,
|
||||||
|
MaxRetryDelay: time.Minute,
|
||||||
|
},
|
||||||
|
},
|
||||||
|
})
|
||||||
|
if err != nil {
|
||||||
return fmt.Errorf("failed to create Azure client: %v", err)
|
return fmt.Errorf("failed to create Azure client: %v", err)
|
||||||
}
|
}
|
||||||
|
|
||||||
g.client = client
|
g.client = client
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user