mirror of
https://github.com/arangodb/kube-arangodb.git
synced 2024-12-14 11:57:37 +00:00
[Bugfix] Fix backup creation timeout (#952)
This commit is contained in:
parent
627f6f729a
commit
30ea984f9d
2 changed files with 6 additions and 2 deletions
|
@ -3,6 +3,7 @@
|
|||
## [master](https://github.com/arangodb/kube-arangodb/tree/master) (N/A)
|
||||
- (Feature) Allow configuration for securityContext.runAsUser value
|
||||
- (Bugfix) Fix Satellite collections in Agency
|
||||
- (Bugfix) Fix backup creation timeout
|
||||
|
||||
## [1.2.9](https://github.com/arangodb/kube-arangodb/tree/1.2.9) (2022-03-30)
|
||||
- (Feature) Improve Kubernetes clientsets management
|
||||
|
|
|
@ -75,8 +75,7 @@ func (ac *arangoClientBackupImpl) List() (map[driver.BackupID]driver.BackupMeta,
|
|||
}
|
||||
|
||||
func (ac *arangoClientBackupImpl) Create() (ArangoBackupCreateResponse, error) {
|
||||
ctx, cancel := context.WithTimeout(context.Background(), defaultArangoClientTimeout)
|
||||
defer cancel()
|
||||
dt := defaultArangoClientTimeout
|
||||
|
||||
co := driver.BackupCreateOptions{}
|
||||
|
||||
|
@ -86,9 +85,13 @@ func (ac *arangoClientBackupImpl) Create() (ArangoBackupCreateResponse, error) {
|
|||
}
|
||||
if timeout := opt.Timeout; timeout != nil {
|
||||
co.Timeout = time.Duration(*timeout * float32(time.Second))
|
||||
dt += co.Timeout
|
||||
}
|
||||
}
|
||||
|
||||
ctx, cancel := context.WithTimeout(context.Background(), dt)
|
||||
defer cancel()
|
||||
|
||||
id, resp, err := ac.driver.Backup().Create(ctx, &co)
|
||||
if err != nil {
|
||||
return ArangoBackupCreateResponse{}, err
|
||||
|
|
Loading…
Reference in a new issue