Skip to content

How to stop asyncio subscribe request? #50

@steeljardas

Description

@steeljardas

I need help, so I'm connecting to a websocket with Python GraphQL Client.

ws = GraphqlClient(endpoint='wss://wax.dfuse.eosnation.io/graphql', headers=headers)
asyncio.run(ws.subscribe(query=query, handle=callback, headers=headers))

It's working flawlessly, the only issue is that, it simply stops streaming the data after 3 minutes(due to how the API works) so I need to reconnect somehow. I need to have a way to get asyncio to stop running once no data has been returned after a while or something like that so that the loop can run again and reconnect, is there a way to do this?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions