-
Notifications
You must be signed in to change notification settings - Fork 338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Don't use exhausted nextToken #142
base: master
Are you sure you want to change the base?
Conversation
It seems the AWS API changed so that if you specify a nextToken that you've already used, you don't actually get new results (and a new nextToken). This patch simply drops the nextToken from the request after it's been used (which appears to fix the `--watch` behaviour at least for me).
Thanks @martynsmith for the patch. I understand the problem you are explaining... but I'm not sure removing the I wonder if the correct solution would involve keeping track of the latest |
Hmm, it appears to be working for me locally, but perhaps that's just because you're dropping duplicate lines?
…On 30 Jul 2017, 4:18 AM +1200, Jorge Bastida ***@***.***>, wrote:
Thanks @martynsmith for the patch. I understand the problem you are explaining... but I'm not sure removing the next_token will solve the issue. My understanding is that the following request after removing the token, aws will start over sending events from the beginning.
I wonder if the correct solution would involve keeping track of the latest timestamp of the response events, and once one of the response comes empty, remove the next_token and use the latest timestamp as the starting point.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub, or mute the thread.
|
@jorgebastida I've implemented a fix according to your suggestion, and it seems to address the issue quite well. If there's interest I'll prepare a PR. |
@gavrie Yes please! |
I think #196 also fixes what this PR here provides/does. |
It seems the AWS API changed so that if you specify a nextToken that you've already used, you don't actually get new results (and a new nextToken).
This patch simply drops the nextToken from the request after it's been used (which appears to fix the
--watch
behaviour at least for me).While I haven't completely read the existing bugs and pull requests for this, this seems like a relatively minor tweak to make the watch behaviour work again. (related are #74 and #62)