Commit 986bcb0e authored by Stavros Sachtouris's avatar Stavros Sachtouris Committed by Giorgos Korfiatis
Browse files

Adjust CLI to new status report mechanism

parent 5f9e8ba3
......@@ -36,6 +36,8 @@ NOTIFICATION = {
1000: 'Critical error'
}
remaining = lambda st: st['unsynced'] - (st['synced'] + st['failed'])
class ConfigCommands:
"""Commands for handling Agkyra config options"""
......@@ -234,7 +236,7 @@ class AgkyraCLI(cmd.Cmd):
status, msg = client.get_status() if client else None, 'Not running'
if status:
msg = NOTIFICATION[status['code']]
diff = status['unsynced'] - status['synced']
diff = remaining(status)
if diff:
msg = '%s, %s remaining' % (msg, diff)
sys.stdout.write('%s\n' % msg)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment