Skip to content
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

(Emailed in) Prune & Clear #12

Open
chuyskywalker opened this issue Dec 11, 2014 · 3 comments
Open

(Emailed in) Prune & Clear #12

chuyskywalker opened this issue Dec 11, 2014 · 3 comments

Comments

@chuyskywalker
Copy link
Owner

My apologies for emailing you about your Repository, however it appears the Issues button is turned off and I wanted to ask for your input on a PR I’d like to make before I start, since you seem to be the head of the project.

Currently, RollingCurl::clearCompleted() states it will help prevent out of memory errors, but it only clears the completedRequests array. In my opinion, it would be extremely beneficial to get the behavior of prunePendingRequestQueue() during that process as well.

I realize that a developer could make their own code run both, but if that is the desired approach I think the documentation and phpdocs should be updated slightly to reflect the necessity for that. When you’re running RollingCurl in a continuous script and handling thousands of requests, it can cause issues because of the pendingRequests array and without checking the code directly you wouldn’t know the prune method exists.

I was thinking that perhaps requests could be removed from the pendingRequests array as they are being processed or the prunePendingRequestQueue() could also be called inside clearCompleted().

I just wanted to know if you’d prefer the documentation update approach or the programmatic approach. Please let me know and I’ll gladly create a PR.

Thanks again for your great library and again, I apologize for contacting you via email about your repository.

@chuyskywalker
Copy link
Owner Author

First: Thanks for taking the time to track me down about the missing issues tab. That was silly of me.

Second, I'd prefer that the functions only do what they say they do -- having clearCompleted() do more than it states isn't kosher.

I'd happy accept a PR with either documentation updates for handling massive queues of URLS, PHPDoc clarification/elucidation, or even a new function that has a more generic "do all the clearing memory things" nomenclature.

@iit2011081
Copy link

Can I use GET and PUT request in parallel ?

@iit2011081
Copy link

Can you post an example where cookies are used

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

No branches or pull requests

2 participants