'botocore custome waiter doesn't exit on condition met
I am trying to make a custom waiter for CloudWatch.get_query_results() based on this. I did as the instruction says, a CustomWaiter base class then I have a LogQueryWaiter extend the base class, which is as follow
class QueryState(Enum):
SUCCESS = "Complete"
FAILURE = "Failed" or "Timeout"
class LogQueryWaiter(CustomWaiter):
"""Wait for a log query to finish"""
def __init__(self, client, delay=10, max_tries=60, matcher="path"):
acceptors = {"COMPLETED": QueryState.SUCCESS, "FAILED": QueryState.FAILURE}
super().__init__(
"LogQueryComplete",
"GetQueryResults",
"status",
acceptors,
client,
delay,
max_tries,
matcher,
)
def wait(self, query_id:str) -> None:
self._wait(queryId=query_id)
The problem is that it gets stuck in the waiter when calling LogQueryWaiter.wait(). From the logging info in the base class I can see the acceptor condition is met but the waiter keeps waiting.

I don't understand where it went wrong. Any help would be appreciated, thanks!
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|
