Hello.
I have a Python container that is constantly listening to Genesys notifications in a websocket, and recently I bumped into the 24 hour valid time limit for the websocket. I know that you can renew the channel by resubscribing the topics.
What is the best recommended practice for renewing the channel in an asynchronous python consumer? How to detect that the channel needs renewing, what action to take to renew, and in which part of the code flow in a consumer thats constantly listening? As a small guide, the following code is a simplified version of the consumer:
async def main():
async for websocket in websockets.connect(uri):
.......
while True:
notification_message = await websocket.recv()
.......
If you have any doubts, please ask. Thanks for the help.