diff options
author | Antonio Terceiro <antonio.terceiro@linaro.org> | 2014-05-08 17:31:03 -0300 |
---|---|---|
committer | Antonio Terceiro <antonio.terceiro@linaro.org> | 2014-05-08 17:31:03 -0300 |
commit | 9a9e2f41aaac5f1d0e79d362ef6a185ae5557936 (patch) | |
tree | e2f58893af72747bf9d138a511040f0fe0be1f60 | |
parent | 5fdaaba58deb6bb315b0ea9ed1b7656794d12a07 (diff) | |
parent | 81851a347313d3b13e8f982892feb6affc9043f9 (diff) |
Merge tag 'upstream/0.11'
Upstream version 0.11
# gpg: Signature made Qui 08 Mai 2014 17:31:01 BRT using RSA key ID CD460BDE
# gpg: Good signature from "Antonio Terceiro <terceiro@softwarelivre.org>"
# gpg: aka "Antonio Terceiro <terceiro@dcc.ufba.br>"
# gpg: aka "Antonio Terceiro <terceiro@colivre.coop.br>"
# gpg: aka "Antonio Terceiro <terceiro@debian.org>"
# gpg: aka "Antonio Terceiro <antonio.terceiro@linaro.org>"
# gpg: aka "Antonio Terceiro <terceiro@cs.ubc.ca>"
-rw-r--r-- | PKG-INFO | 2 | ||||
-rw-r--r-- | lava/tool/__init__.py | 2 | ||||
-rw-r--r-- | lava_scheduler_tool/commands.py | 21 | ||||
-rw-r--r-- | lava_tool.egg-info/PKG-INFO | 2 |
4 files changed, 24 insertions, 3 deletions
@@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: lava-tool -Version: 0.10 +Version: 0.11 Summary: Command line utility for Linaro validation services Home-page: https://launchpad.net/lava-tool Author: Zygmunt Krynicki diff --git a/lava/tool/__init__.py b/lava/tool/__init__.py index 0f26dab..84551f7 100644 --- a/lava/tool/__init__.py +++ b/lava/tool/__init__.py @@ -24,4 +24,4 @@ lava.tool Generic code for command line utilities for LAVA """ -__version__ = (0, 10, 0, "final", 0) +__version__ = (0, 11, 0, "final", 0) diff --git a/lava_scheduler_tool/commands.py b/lava_scheduler_tool/commands.py index 3529617..367dfda 100644 --- a/lava_scheduler_tool/commands.py +++ b/lava_scheduler_tool/commands.py @@ -19,6 +19,7 @@ import os import sys import argparse +import time import xmlrpclib from lava_tool.authtoken import AuthenticatingServerProxy, KeyringAuthBackend @@ -44,6 +45,9 @@ class submit_job(Command): super(submit_job, cls).register_arguments(parser) parser.add_argument("SERVER") parser.add_argument("JSON_FILE") + parser.add_argument("--block", + action="store_true", + help="Blocks until the job gets executed") def invoke(self): server = AuthenticatingServerProxy( @@ -57,6 +61,23 @@ class submit_job(Command): else: print "submitted as job id:", job_id + if self.args.block: + print('') + print('Waiting for the job to run ') + print('. = job waiting in the queue') + print('# = job running') + print('') + job = {'job_status': 'Unknown'} + progress = {'Submitted': '.', 'Running': '#'} + while job['job_status'] in ['Unknown', 'Submitted', 'Running']: + job = server.scheduler.job_status(job_id) + sys.stdout.write(progress.get(job['job_status'], '')) + sys.stdout.flush() + time.sleep(10) # seconds + print('') + print('') + print('Job Status: %s' % job['job_status']) + class resubmit_job(Command): diff --git a/lava_tool.egg-info/PKG-INFO b/lava_tool.egg-info/PKG-INFO index 91cb643..74a95bb 100644 --- a/lava_tool.egg-info/PKG-INFO +++ b/lava_tool.egg-info/PKG-INFO @@ -1,6 +1,6 @@ Metadata-Version: 1.1 Name: lava-tool -Version: 0.10 +Version: 0.11 Summary: Command line utility for Linaro validation services Home-page: https://launchpad.net/lava-tool Author: Zygmunt Krynicki |