Closed danielparas closed 7 years ago
That's a node DDP issue. There's no code in this repo that touches on the DDP connection. You should look over there (IIRC, this issue has been raised there before, so check the open/closed issues for discussion to see what has been done previously.) My recollection is that you are responsible in some cases for initiating new connections when they drop. The DDP package's autoReconnect
isn't a cure-all (it doesn't retry endlessly or implement a backoff strategy, or...)
You can listen to various events and implement your own reconnection strategy. For example by implementing different behavior for the onError
and onClose
functions in this sample app.
https://github.com/vsivsi/meteor-job-collection-playground-worker/blob/master/work.coffee#L105-L118
But if you want a more detailed discussion, please do so on the DDP repo.
thanks @vsivsi ! I have implemented code as suggested in the sample app but it doesn't seem to catch the disconnect for some reason. Will see what I can find/ask on node DDP.
Hi, not sure where to post this (meteor-job-collection or node-ddp-client) but I'm having trouble with a my pure node workers. If the connection with the job server is lost, for whatever reason (eg. job server deploy or restart), the following error is thrown and the worker never reconnects, despite having the following config for node-dpp-client.
Error thrown:
Any ideas what can be done to solve this - maybe I'm missing something.
Thanks in advance! Daniel