Revision f1048938 lib/cli.py
b/lib/cli.py | ||
---|---|---|
382 | 382 |
|
383 | 383 |
job_id = cl.SubmitJob([op]) |
384 | 384 |
|
385 |
lastmsg = None |
|
385 | 386 |
while True: |
386 |
jobs = cl.QueryJobs([job_id], ["status"]) |
|
387 |
jobs = cl.QueryJobs([job_id], ["status", "ticker"])
|
|
387 | 388 |
if not jobs: |
388 | 389 |
# job not found, go away! |
389 | 390 |
raise errors.JobLost("Job with id %s lost" % job_id) |
... | ... | |
392 | 393 |
status = jobs[0][0] |
393 | 394 |
if status in (constants.JOB_STATUS_SUCCESS, constants.JOB_STATUS_ERROR): |
394 | 395 |
break |
396 |
msg = jobs[0][1] |
|
397 |
if msg is not None and msg != lastmsg: |
|
398 |
print "%s %s" % (time.ctime(msg[0]), msg[2]) |
|
399 |
lastmsg = msg |
|
395 | 400 |
time.sleep(1) |
396 | 401 |
|
397 | 402 |
jobs = cl.QueryJobs([job_id], ["status", "opresult"]) |
Also available in: Unified diff