Commit b8802cc4 authored by Michael Hanselmann's avatar Michael Hanselmann
Browse files

jqueue/gnt-job: Add job priority fields for display

These fields can help with debugging.
Signed-off-by: default avatarMichael Hanselmann <>
Reviewed-by: default avatarIustin Pop <>
parent 900df6cd
......@@ -376,6 +376,8 @@ class _QueuedJob(object):
elif fname == "status":
elif fname == "priority":
elif fname == "ops":
row.append([op.input.__getstate__() for op in self.ops])
elif fname == "opresult":
......@@ -390,6 +392,8 @@ class _QueuedJob(object):
row.append([op.exec_timestamp for op in self.ops])
elif fname == "opend":
row.append([op.end_timestamp for op in self.ops])
elif fname == "oppriority":
row.append([op.priority for op in self.ops])
elif fname == "received_ts":
elif fname == "start_ts":
......@@ -159,6 +159,12 @@
<simpara>the status of the job</simpara>
<simpara>current priority of the job</simpara>
......@@ -227,6 +233,12 @@
<simpara>the list of opcode end times</simpara>
<simpara>the priority of each opcode</simpara>
......@@ -69,6 +69,7 @@ def ListJobs(opts, args):
headers = {
"id": "ID",
"status": "Status",
"priority": "Prio",
"ops": "OpCodes",
"opresult": "OpCode_result",
"opstatus": "OpCode_status",
......@@ -77,6 +78,7 @@ def ListJobs(opts, args):
"opstart": "OpCode_start",
"opexec": "OpCode_exec",
"opend": "OpCode_end",
"oppriority": "OpCode_prio",
"start_ts": "Start",
"end_ts": "End",
"received_ts": "Received",
......@@ -84,6 +86,8 @@ def ListJobs(opts, args):
headers = None
numfields = ["priority"]
# change raw values to nicer strings
for row_id, row in enumerate(output):
if row is None:
......@@ -107,7 +111,8 @@ def ListJobs(opts, args):
row[idx] = str(val)
data = GenerateTable(separator=opts.separator, headers=headers,
fields=selected_fields, data=output)
fields=selected_fields, data=output,
for line in data:
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