Skip to content

Commit

Permalink
chore: fix exception sorting (via synth) (#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
yoshi-automation and tseaver authored Sep 24, 2020
1 parent 0336110 commit 1fb3914
Show file tree
Hide file tree
Showing 5 changed files with 139 additions and 32 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -274,8 +274,8 @@ async def list_indexes(
multiplier=1.3,
predicate=retries.if_exception_type(
exceptions.DeadlineExceeded,
exceptions.ServiceUnavailable,
exceptions.InternalServerError,
exceptions.ServiceUnavailable,
),
),
default_timeout=60.0,
Expand Down Expand Up @@ -362,8 +362,8 @@ async def get_index(
multiplier=1.3,
predicate=retries.if_exception_type(
exceptions.DeadlineExceeded,
exceptions.ServiceUnavailable,
exceptions.InternalServerError,
exceptions.ServiceUnavailable,
),
),
default_timeout=60.0,
Expand Down Expand Up @@ -437,8 +437,8 @@ async def delete_index(
multiplier=1.3,
predicate=retries.if_exception_type(
exceptions.DeadlineExceeded,
exceptions.ServiceUnavailable,
exceptions.InternalServerError,
exceptions.ServiceUnavailable,
),
),
default_timeout=60.0,
Expand Down Expand Up @@ -520,8 +520,8 @@ async def get_field(
multiplier=1.3,
predicate=retries.if_exception_type(
exceptions.DeadlineExceeded,
exceptions.ServiceUnavailable,
exceptions.InternalServerError,
exceptions.ServiceUnavailable,
),
),
default_timeout=60.0,
Expand Down Expand Up @@ -713,8 +713,8 @@ async def list_fields(
multiplier=1.3,
predicate=retries.if_exception_type(
exceptions.DeadlineExceeded,
exceptions.ServiceUnavailable,
exceptions.InternalServerError,
exceptions.ServiceUnavailable,
),
),
default_timeout=60.0,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -125,8 +125,8 @@ def _prep_wrapped_messages(self, client_info):
multiplier=1.3,
predicate=retries.if_exception_type(
exceptions.DeadlineExceeded,
exceptions.ServiceUnavailable,
exceptions.InternalServerError,
exceptions.ServiceUnavailable,
),
),
default_timeout=60.0,
Expand All @@ -140,8 +140,8 @@ def _prep_wrapped_messages(self, client_info):
multiplier=1.3,
predicate=retries.if_exception_type(
exceptions.DeadlineExceeded,
exceptions.ServiceUnavailable,
exceptions.InternalServerError,
exceptions.ServiceUnavailable,
),
),
default_timeout=60.0,
Expand All @@ -155,8 +155,8 @@ def _prep_wrapped_messages(self, client_info):
multiplier=1.3,
predicate=retries.if_exception_type(
exceptions.DeadlineExceeded,
exceptions.ServiceUnavailable,
exceptions.InternalServerError,
exceptions.ServiceUnavailable,
),
),
default_timeout=60.0,
Expand All @@ -170,8 +170,8 @@ def _prep_wrapped_messages(self, client_info):
multiplier=1.3,
predicate=retries.if_exception_type(
exceptions.DeadlineExceeded,
exceptions.ServiceUnavailable,
exceptions.InternalServerError,
exceptions.ServiceUnavailable,
),
),
default_timeout=60.0,
Expand All @@ -188,8 +188,8 @@ def _prep_wrapped_messages(self, client_info):
multiplier=1.3,
predicate=retries.if_exception_type(
exceptions.DeadlineExceeded,
exceptions.ServiceUnavailable,
exceptions.InternalServerError,
exceptions.ServiceUnavailable,
),
),
default_timeout=60.0,
Expand Down
20 changes: 10 additions & 10 deletions google/cloud/firestore_v1/services/firestore/async_client.py
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ async def get_document(
multiplier=1.3,
predicate=retries.if_exception_type(
exceptions.DeadlineExceeded,
exceptions.ServiceUnavailable,
exceptions.InternalServerError,
exceptions.ServiceUnavailable,
),
),
default_timeout=60.0,
Expand Down Expand Up @@ -219,8 +219,8 @@ async def list_documents(
multiplier=1.3,
predicate=retries.if_exception_type(
exceptions.DeadlineExceeded,
exceptions.ServiceUnavailable,
exceptions.InternalServerError,
exceptions.ServiceUnavailable,
),
),
default_timeout=60.0,
Expand Down Expand Up @@ -397,8 +397,8 @@ async def delete_document(
multiplier=1.3,
predicate=retries.if_exception_type(
exceptions.DeadlineExceeded,
exceptions.ServiceUnavailable,
exceptions.InternalServerError,
exceptions.ServiceUnavailable,
),
),
default_timeout=60.0,
Expand Down Expand Up @@ -459,8 +459,8 @@ def batch_get_documents(
multiplier=1.3,
predicate=retries.if_exception_type(
exceptions.DeadlineExceeded,
exceptions.ServiceUnavailable,
exceptions.InternalServerError,
exceptions.ServiceUnavailable,
),
),
default_timeout=300.0,
Expand Down Expand Up @@ -540,8 +540,8 @@ async def begin_transaction(
multiplier=1.3,
predicate=retries.if_exception_type(
exceptions.DeadlineExceeded,
exceptions.ServiceUnavailable,
exceptions.InternalServerError,
exceptions.ServiceUnavailable,
),
),
default_timeout=60.0,
Expand Down Expand Up @@ -711,8 +711,8 @@ async def rollback(
multiplier=1.3,
predicate=retries.if_exception_type(
exceptions.DeadlineExceeded,
exceptions.ServiceUnavailable,
exceptions.InternalServerError,
exceptions.ServiceUnavailable,
),
),
default_timeout=60.0,
Expand Down Expand Up @@ -771,8 +771,8 @@ def run_query(
multiplier=1.3,
predicate=retries.if_exception_type(
exceptions.DeadlineExceeded,
exceptions.ServiceUnavailable,
exceptions.InternalServerError,
exceptions.ServiceUnavailable,
),
),
default_timeout=300.0,
Expand Down Expand Up @@ -948,8 +948,8 @@ def listen(
multiplier=1.3,
predicate=retries.if_exception_type(
exceptions.DeadlineExceeded,
exceptions.ServiceUnavailable,
exceptions.InternalServerError,
exceptions.ServiceUnavailable,
),
),
default_timeout=86400.0,
Expand Down Expand Up @@ -1032,8 +1032,8 @@ async def list_collection_ids(
multiplier=1.3,
predicate=retries.if_exception_type(
exceptions.DeadlineExceeded,
exceptions.ServiceUnavailable,
exceptions.InternalServerError,
exceptions.ServiceUnavailable,
),
),
default_timeout=60.0,
Expand Down Expand Up @@ -1108,7 +1108,7 @@ async def batch_write(
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
exceptions.ServiceUnavailable, exceptions.Aborted,
exceptions.Aborted, exceptions.ServiceUnavailable,
),
),
default_timeout=60.0,
Expand Down
20 changes: 10 additions & 10 deletions google/cloud/firestore_v1/services/firestore/transports/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ def _prep_wrapped_messages(self, client_info):
multiplier=1.3,
predicate=retries.if_exception_type(
exceptions.DeadlineExceeded,
exceptions.ServiceUnavailable,
exceptions.InternalServerError,
exceptions.ServiceUnavailable,
),
),
default_timeout=60.0,
Expand All @@ -133,8 +133,8 @@ def _prep_wrapped_messages(self, client_info):
multiplier=1.3,
predicate=retries.if_exception_type(
exceptions.DeadlineExceeded,
exceptions.ServiceUnavailable,
exceptions.InternalServerError,
exceptions.ServiceUnavailable,
),
),
default_timeout=60.0,
Expand All @@ -159,8 +159,8 @@ def _prep_wrapped_messages(self, client_info):
multiplier=1.3,
predicate=retries.if_exception_type(
exceptions.DeadlineExceeded,
exceptions.ServiceUnavailable,
exceptions.InternalServerError,
exceptions.ServiceUnavailable,
),
),
default_timeout=60.0,
Expand All @@ -174,8 +174,8 @@ def _prep_wrapped_messages(self, client_info):
multiplier=1.3,
predicate=retries.if_exception_type(
exceptions.DeadlineExceeded,
exceptions.ServiceUnavailable,
exceptions.InternalServerError,
exceptions.ServiceUnavailable,
),
),
default_timeout=300.0,
Expand All @@ -189,8 +189,8 @@ def _prep_wrapped_messages(self, client_info):
multiplier=1.3,
predicate=retries.if_exception_type(
exceptions.DeadlineExceeded,
exceptions.ServiceUnavailable,
exceptions.InternalServerError,
exceptions.ServiceUnavailable,
),
),
default_timeout=60.0,
Expand All @@ -215,8 +215,8 @@ def _prep_wrapped_messages(self, client_info):
multiplier=1.3,
predicate=retries.if_exception_type(
exceptions.DeadlineExceeded,
exceptions.ServiceUnavailable,
exceptions.InternalServerError,
exceptions.ServiceUnavailable,
),
),
default_timeout=60.0,
Expand All @@ -230,8 +230,8 @@ def _prep_wrapped_messages(self, client_info):
multiplier=1.3,
predicate=retries.if_exception_type(
exceptions.DeadlineExceeded,
exceptions.ServiceUnavailable,
exceptions.InternalServerError,
exceptions.ServiceUnavailable,
),
),
default_timeout=300.0,
Expand All @@ -251,8 +251,8 @@ def _prep_wrapped_messages(self, client_info):
multiplier=1.3,
predicate=retries.if_exception_type(
exceptions.DeadlineExceeded,
exceptions.ServiceUnavailable,
exceptions.InternalServerError,
exceptions.ServiceUnavailable,
),
),
default_timeout=86400.0,
Expand All @@ -266,8 +266,8 @@ def _prep_wrapped_messages(self, client_info):
multiplier=1.3,
predicate=retries.if_exception_type(
exceptions.DeadlineExceeded,
exceptions.ServiceUnavailable,
exceptions.InternalServerError,
exceptions.ServiceUnavailable,
),
),
default_timeout=60.0,
Expand All @@ -280,7 +280,7 @@ def _prep_wrapped_messages(self, client_info):
maximum=60.0,
multiplier=1.3,
predicate=retries.if_exception_type(
exceptions.ServiceUnavailable, exceptions.Aborted,
exceptions.Aborted, exceptions.ServiceUnavailable,
),
),
default_timeout=60.0,
Expand Down
Loading

0 comments on commit 1fb3914

Please sign in to comment.