-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Add queue:run-all command #6204
Conversation
Thanks for the POC. I'm still hesitant. maybe we doa refactor but keep the new command in contrib. Logging will be an issue. Its not clear which queue some log messages and errors are referring to. |
I did some work on improving the logging:
To be clear, 'Processed X items' does not include failed/skipped items. |
I added the |
f22d429
to
68005fb
Compare
I added the If we decided not to merge this into Drush core, I will probably start a new module with the That said, I am still fan of the idea of adding this to Drush core. It doesn't add a lot of code or complexity and it's very useful. |
If the memory limit is reached, won't folks expect the command to restart itself? Should the above statement only apply to items and time limits? |
I don't really see the point of this option in general. In what case would you use it, except to just limit the amount of work that's being done. Would it make more sense to leave it out of
In my use case, software like Supervisor takes care of restarting automatically, but I guess we could add a
That wasn't my idea. Why? |
If you're really not sold on the idea of adding the new command and new options, no problem, just let me know and I'll add it to a contrib module. I still wouldn't mind maintaining this in Drush core though. What do you think? |
Let's start with this in Contrib. Feel free to refactor our existing commands so that building on them is easier. Also feel free to link to the contrib commands from the description of migrate:run command |
I moved the |
Adds a
queue:run-all
command that does the same asqueue:run
, but for all available queues instead of a specific one. It takes the same options, but without the argument. The limit options count across all queues instead of a specific queue.Also adds a
--memory-limit
option that takes either a number that ends with g/m/k (the format of thememory_limit
ini setting) or a percentage. The command will run until that amount of memory is consumed. This option is added to bothqueue:run
andqueue:run-all
.Also adds a
--daemon
option that keeps the command running untilitems-limit
,lease-limit
ormemory-limit
is reached - if defined. Else, it keeps going indefinitely. This option is added to bothqueue:run
andqueue:run-all
.Fixes #6062.