Skip to content

Commit

Permalink
check for done redis operations before waiting on them
Browse files Browse the repository at this point in the history
  • Loading branch information
danawillow committed Jun 8, 2018
1 parent d791a88 commit f517a7e
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions templates/terraform/redis_operation.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,13 @@ func redisOperationWait(service *redis.Service, op *redis.Operation, project, ac
}

func redisOperationWaitTime(service *redis.Service, op *redis.Operation, project, activity string, timeoutMin int) error {
if op.Done {
if op.Error != nil {
return fmt.Errorf("Error code %v, message: %s", op.Error.Code, op.Error.Message)
}
return nil
}

w := &RedisOperationWaiter{
Service: service.Projects.Locations,
Op: op,
Expand Down

0 comments on commit f517a7e

Please sign in to comment.