X-Git-Url: https://git.decadent.org.uk/gitweb/?a=blobdiff_plain;f=dak%2Fqueue_report.py;h=7e4e14745706027a31734c054fb1ec20827f849f;hb=f601bd71e61c6c265b5fa1f296a5258385e6f154;hp=19673d5593a0d313de1d97598d0236c6b4cffd9f;hpb=163369d3a452071eaa159cca4b8a76b063823af6;p=dak.git diff --git a/dak/queue_report.py b/dak/queue_report.py index 19673d55..7e4e1474 100755 --- a/dak/queue_report.py +++ b/dak/queue_report.py @@ -43,9 +43,11 @@ except ImportError: pass from daklib import utils -from daklib.queue import Upload -from daklib.dbconn import DBConn, has_new_comment, DBChange, DBSource, get_uid_from_fingerprint +from daklib.dbconn import DBConn, DBSource, has_new_comment, PolicyQueue, \ + get_uid_from_fingerprint +from daklib.policy import PolicyQueueUploadHandler from daklib.textutils import fix_maintainer +from daklib.utils import get_logins_from_ldap from daklib.dak_exceptions import * Cnf = None @@ -56,7 +58,7 @@ row_number = 0 def usage(exit_code=0): print """Usage: dak queue-report -Prints a report of packages in queue directories (usually new and byhand). +Prints a report of packages in queues (usually new and byhand). -h, --help show this help and exit. -8, --822 writes 822 formated output to the location set in dak.conf @@ -115,7 +117,15 @@ def time_pp(x): def sg_compare (a, b): a = a[1] b = b[1] - """Sort by have note, time of oldest upload.""" + """Sort by have pending action, have note, time of oldest upload.""" + # Sort by have pending action + a_note_state = a["processed"] + b_note_state = b["processed"] + if a_note_state < b_note_state: + return -1 + elif a_note_state > b_note_state: + return 1 + # Sort by have note a_note_state = a["note_state"] b_note_state = b["note_state"] @@ -178,6 +188,7 @@ def header(): Debian NEW and BYHAND Packages @@ -222,6 +234,7 @@ def header(): def footer(): print "

Timestamp: %s (UTC)

" % (time.strftime("%d.%m.%Y / %H:%M:%S", time.gmtime())) + print "

There are graphs about the queues available.

" print """