Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

Fix MongoError: No more documents in tailed cursor #134

Closed
wants to merge 1 commit into from

Conversation

jaydp17
Copy link

@jaydp17 jaydp17 commented Sep 14, 2015

@jaydp17
Copy link
Author

jaydp17 commented Sep 15, 2015

I don't know why the tests fail, but messages are delivered. I'd recommend you too verify that.
I tried to figure out the reason for tests failing but didn't quite get it.
You see any clue ?

@mcollina
Copy link
Collaborator

I don't see:

  1. why this solves the problem in [MongoDb] No more documents in tailed cursor mosca#346
  2. it seems to me that error you are seeing is 'Stats failed: MongoError: unauthorized', because that is what it is failing the re-initialization of the cursor
  3. the attached code can't work, because handle() returns a function: https://github.com/mcollina/ascoltatori/blob/master/lib/mongo_ascoltatore.js#L139-L160, you probably forgot some more change

@cfan8 I think this is related to #132.

@jaydp17
Copy link
Author

jaydp17 commented Sep 15, 2015

  1. I don't know why it solves, but I read about it in this StackOverflow question. Also, Cursor.each is deprecated.
  2. I don't get Stats failed: MongoError: unauthorized after this patch.
  3. Yes, I know handle() returns a function, and I call it here

Also, I went back before #131 was merged and tried it. I do get Stats failed: MongoError: unauthorized

@mcollina
Copy link
Collaborator

Can you complete the refactor to remove the deprecation of Cursor.each. The handle function does not need to return a function at all, we can just call it through.

Moreover, all unit tests related to MongoDB fails, so there is some more problem in here.

Keep up the good work anyway, sorry that I've missed that call!

@jaydp17
Copy link
Author

jaydp17 commented Oct 6, 2015

It might take me some time to get back to this, but i'll finish it for sure

@mcollina
Copy link
Collaborator

Is the problem described still valid? Things are working fine with 2.0.0 now. Please check and in case reopen this PR basing it on top of v2.

@mcollina mcollina closed this Jan 19, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants