~oddbloke/pqm/249041

« back to all changes in this revision

Viewing changes to pqm/ui/twistd.py

  • Committer: Robert Collins
  • Date: 2007-09-20 23:03:38 UTC
  • Revision ID: robertc@robertcollins.net-20070920230338-isfe1h3lh0xwvom5
Merge Tom's stop-flag to allow stopping pqm processing patches.

Show diffs side-by-side

added added

removed removed

Lines of Context:
54
54
            return self.getProjectPage(None, request).render(request)
55
55
 
56
56
    def getProjectPage(self, selected_project, request):
 
57
    
 
58
        # Get queuedir
 
59
        configp = pqm.ConfigParser()
 
60
        configp.read(pqm.configfile_names)
 
61
        handler = pqm.BranchSpecOptionHandler(configp)
 
62
        queuedir = pqm.get_queuedir(configp, logging, [])
 
63
 
57
64
        text = "<h1>PQM Queue: %d scripts</h1>" % len(self.queue.messages)
 
65
        if os.path.isfile("%s/stop.patch" % queuedir):
 
66
            text += "<h2>PQM is not currently processing additional requests</h2>"
58
67
        text += "<p>Current time: %s UTC</p>" % cgi.escape(
59
68
            time.strftime("%a, %d %b %Y %H:%M:%S", time.gmtime()))
60
69
        other_project_request_count = 0