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()
@davidvoler could you post a full stack trace so I can inspect it? Without seeing the stack trace this type of error occurs when you write to a websocket that has already been closed.
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