Skip to content

Broken pipe Exception - after Meteor restart #25

Open
@davidvoler

Description

@davidvoler

I am using Python-Meteor to communicate from a celery task to meteor server
I the meteor is restarted for some reasons - I am getting a Broken Pipe exception from python sockets.
I am trying to use both auto_reconnect=True or auto_reconnect=False and in both cases I am getting the Broken Pipe exception.
The code is as follows:

from celery import Celery
app = Celery('proj', broker='amqp://localhost//', backend='redis://localhost')
from MeteorClient import MeteorClient
client = MeteorClient('ws://127.0.0.1:3000/websocket', auto_reconnect=True)
client.connect()

@app.task
def notify_meteor(x,y):
print (client.connected) #Prints True
client.call('myMetoerMethod', [x,y]) #Raises an exception

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions