Skip to content

Commit

Permalink
add retry to disable service usage and update serviceUsageServiceBein…
Browse files Browse the repository at this point in the history
…gActivated function (#4098) (#550)

Signed-off-by: Modular Magician <[email protected]>
  • Loading branch information
modular-magician authored Oct 14, 2020
1 parent f5c0737 commit c39d1d7
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions google/error_retry_predicates.go
Original file line number Diff line number Diff line change
Expand Up @@ -197,10 +197,10 @@ func isSqlOperationInProgressError(err error) (bool, string) {
func serviceUsageServiceBeingActivated(err error) (bool, string) {
if gerr, ok := err.(*googleapi.Error); ok && gerr.Code == 400 {
if strings.Contains(gerr.Body, "Another activation or deactivation is in progress") {
return false, ""
return true, "Waiting for same service activation/deactivation to finish"
}

return true, "Waiting for same service activation/deactivation to finish"
return false, ""
}
return false, ""
}
Expand Down

0 comments on commit c39d1d7

Please sign in to comment.