-
Notifications
You must be signed in to change notification settings - Fork 25
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
FEATURE: Work limited number of jobs #4
Conversation
Long running jobs can exhaust the PHP memory limit. This allows you to run as few or as many jobs as you'd like. To use: ./flow job:work --limit <number> <queue-name> With Zsh, you could do something like this to do the next 500 jobs: repeat 100 do ./flow job:work --limit=5 org.typo3.docs.combo; echo "did 5 jobs"; done
👍 |
👍 by reading, we had something similar in a project, but with a time limit - makes total sense to somehow limit execution of the worker |
👍 by reading |
Thanks for this and sorry for the lack of response. I'll incorporate this feature into the rewrite to be pushed by next week! |
@bwaidelich: Great. Maybe you could also consider this commit: Otherwise I can also create an PR after yours. |
Hi all. I haven't yet added this to the "major overhaul" as promised (see #10), but IMO it is not necessary with that version anymore because:
If you still think a hard limit on the amount of jobs makes sense, let me know and I'll try to incorporate this into the master branch once the PR is merged! |
@dlubitz Now I remember where I've seen an example for that |
For NatIo the connection->wait() accept a number of job, and I think it's a good "metric", but number of second is also fine, feel free to close this one if your PR's solve the problem anyway |
@bwaidelich The hard limit would be very useful. I use it especially for mail sending to prevent exeeding limits of the webhoster (e.g n mails per minute/hour). |
Good point, I'll add it to the existing PR |
Implemented with 17adaf7 |
Long running jobs can exhaust the PHP memory limit. This allows you to
run as few or as many jobs as you'd like.
To use:
./flow job:work --limit
With Zsh, you could do something like this to do the next 500 jobs:
repeat 100 do ./flow job:work --limit=5 org.typo3.docs.combo; echo "did 5 jobs"; done