-
Notifications
You must be signed in to change notification settings - Fork 2
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: Batch commands #15
Comments
Agreed, but it should not limited to clearing cache. We should be able a single against multiple/all instances. But i'm not sure how to handle failures in those situations... |
Certainly! Batching in general would be awesome to extend to the other commands, where appropriate. Here's a simple proof of concept for batching "MODX Version" (unnecessary, I know -- just a simple/safe command I used for testing) modx config:list | tail -n +4 | grep "|" | awk -F" " '{ system("modx version -s"$2"") }' |
Thanks for putting that out here! After leaving that idea grow, i guess i could come up with a "batch" command that would execute any sub command...
Does that sound like a good idea ? Edit : i guess this also brings the need to enable commands to be "batcheable". It does not make sense to "batch install" for example. I also forgot to handle command arguments/options so far... |
@rtripault that is awesome! Exactly the line of thinking I had, since -- in some cases -- you'd definitely need the ability to only target a handful of instances. Agreed, some things should not be "batchable." Let me know if there's anything I can do to assist. e.g. Testing, at the very least. EDIT: I'm not sure what would be easiest in terms of flagging a command in support of batch (opt in vs. opt out approach.) |
With some minor bash scripting, it shouldn't be too difficult to create a loop of each configured instance, mapping a subsequent call to
system:clearcache
to each.It would be even cooler + easier if there was a built in batch command to clear all caches from the tool itself.
The text was updated successfully, but these errors were encountered: