# run deis ps -a <app name> for each app
deis-multiplexer.py ps
# run deis limits -a <app name> for each app
deis-multiplexer.py limits
# BE CAREFULL: run deis ps:restart -a <app name> for each app
deis-multiplexer.py ps:restart
Created
October 9, 2017 18:02
-
-
Save matagus/f047d9a0c88b6bd20744369bb9963214 to your computer and use it in GitHub Desktop.
Run a deis command for all your deis apps
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import subprocess | |
import sys | |
if __name__ == "__main__": | |
p = subprocess.run(["deis", "apps"], stdout=subprocess.PIPE) | |
app_list = p.stdout.split()[2:] | |
cmd = ["deis"] + sys.argv[1:] | |
for app in app_list: | |
p = subprocess.run(cmd + ["-a", app.decode("utf-8")], stdout=subprocess.PIPE, universal_newlines=True) | |
print(p.stdout) | |
print() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment