Skip to content

Would be nice to have a event when the queue is empty. #306

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

Closed
wants to merge 2 commits into from
Closed

Would be nice to have a event when the queue is empty. #306

wants to merge 2 commits into from

Conversation

littlebee
Copy link

The use case is that I have millions of rows in a table (T1) and I need to query T1 and then query a another table (T2) which has 0-4 rows per row in the first. I need to not let T2 grow too much and I want to fire off a batch of queries and then wait until they finish and then queue up some of the T2 queries.

It's a fairly simple mod.

@dresende
Copy link
Collaborator

Isn't this related to #271 ?

@dresende
Copy link
Collaborator

Such event will be created, but probably named drain as other core node events are called. Keeping this open for now as your code seems cleaner than the other drain event pull requests.

@grncdr
Copy link
Contributor

grncdr commented Oct 31, 2012

Could you explain what you mean by "not let T2 grow too much"? TBH I don't really understand why your scenario requires a 'drain' event, some sample code illustrating the way it works with your proposed change would really help.

@dresende
Copy link
Collaborator

I think she means she doesn't want to drag the server down with millions of queries, so the goal is to make a batch of queries, then wait for them to finish, possibly wait a bit and then batch more queries, and so on..

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

3 participants