Skip to content

Commit 5bc0c40

Browse files
committed
fix retry syntax
1 parent d39afc3 commit 5bc0c40

File tree

1 file changed

+6
-8
lines changed

1 file changed

+6
-8
lines changed

servicex/servicex_adapter.py

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -135,14 +135,12 @@ async def get_transform_status(self, request_id: str) -> TransformStatus:
135135
retry_options = ExponentialRetry(attempts=5, start_timeout=3)
136136
async with RetryClient(retry_options=retry_options) as client:
137137
try:
138-
async for attempt in AsyncRetrying(retry=retry_if_not_exception_type
139-
(
140-
AuthorizationError,
141-
ValueError
142-
),
143-
stop=stop_after_attempt(3),
144-
wait=wait_fixed(3),
145-
reraise=True):
138+
async for attempt in AsyncRetrying(
139+
retry=(retry_if_not_exception_type(AuthorizationError)
140+
| retry_if_not_exception_type(ValueError)),
141+
stop=stop_after_attempt(3),
142+
wait=wait_fixed(3),
143+
reraise=True):
146144
with attempt:
147145
async with client.get(url=f"{self.url}/servicex/"
148146
f"transformation/{request_id}",

0 commit comments

Comments
 (0)