mirror of
https://github.com/seaweedfs/seaweedfs.git
synced 2025-11-08 02:34: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)
|
||||
client, err := azblob.NewClientWithSharedKeyCredential(serviceURL, credential, nil)
|
||||
if err != nil {
|
||||
return fmt.Errorf("failed to create Azure client: %v", err)
|
||||
}
|
||||
client, err := azblob.NewClientWithSharedKeyCredential(serviceURL, credential, &azblob.ClientOptions{
|
||||
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)
|
||||
}
|
||||
|
||||
g.client = client
|
||||
|
||||
|
||||
Reference in New Issue
Block a user