Skip to content
This repository has been archived by the owner on Jan 30, 2018. It is now read-only.

Commit

Permalink
Add --skip command.
Browse files Browse the repository at this point in the history
This will allow us to resume pushes one host beyond a broken host.
  • Loading branch information
spladug committed Jul 10, 2012
1 parent afd7a1a commit b7a3330
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
3 changes: 3 additions & 0 deletions push/args.py
Expand Up @@ -138,6 +138,9 @@ def _parse_args(config):
parser.add_argument("--no-shuffle", dest="shuffle",
action="store_false",
help="don't shuffle host list")
parser.add_argument("--skip", dest="skip_one",
action="store_true", default=False,
help="skip the first host in the list (obeying startat first)")

flags_group = parser.add_argument_group("flags")
flags_group.add_argument("-t", dest="testing", action="store_true",
Expand Down
5 changes: 5 additions & 0 deletions push/deploy.py
Expand Up @@ -147,6 +147,11 @@ def _push(self):
else:
continue

# skip one host
if self.args.skip_one:
self.args.skip_one = False
continue

self.process_host(host)

def cancel_push(self, reason):
Expand Down

0 comments on commit b7a3330

Please sign in to comment.