Module Expr Str Import alias Import alias Import alias Import alias ImportFrom alias ImportFrom alias ImportFrom alias ImportFrom alias alias ImportFrom alias alias Assign NameStore Call NameLoad Str keyword Str ClassDef bases NameLoad body Expr Str FunctionDef arguments args NameParam NameParam defaults NameLoad body Assign AttributeStore NameLoad attr NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If CompareNotIn Str NameLoad body Expr Call NameLoad Str ListLoad TupleLoad Str Str Return ListLoad Str If CompareEq Call AttributeLoad NameLoad attr Str Str body Return Call AttributeLoad NameLoad attr NameLoad NameLoad orelse Return Call AttributeLoad NameLoad attr NameLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body Expr Call NameLoad Str ListLoad TupleLoad Str Str Assign NameStore Call NameLoad NameLoad If Call AttributeLoad NameLoad attr Str body Assign NameStore SubscriptLoad NameLoad Index Str orelse Assign NameStore NameLoad Assign NameStore SubscriptLoad NameLoad Index Str Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad AttributeLoad NameLoad attr attr Expr Call AttributeLoad NameLoad attr keyword Lambda arguments args NameParam defaults SubscriptLoad SubscriptLoad NameLoad Index Num Index Num Assign NameStore ListLoad For TupleStore NameStore TupleStore NameStore NameStore NameLoad body Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad If NameLoad body Assign AttributeStore NameLoad attr Call NameLoad NameLoad orelse Assign AttributeStore NameLoad attr Str Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad BinOpSub NameLoad NameLoad Assign AttributeStore NameLoad attr Call NameLoad AttributeLoad NameLoad attr Assign AttributeStore NameLoad attr NameLoad Assign AttributeStore NameLoad attr Call NameLoad NameLoad Assign NameStore Call AttributeLoad NameLoad attr keyword Str keyword NameLoad keyword Call NameLoad AttributeLoad NameLoad attr keyword Call NameLoad NameLoad keyword SubscriptLoad NameLoad Index Str keyword NameLoad keyword AttributeLoad NameLoad attr keyword NameLoad keyword Call NameLoad keyword Call AttributeLoad NameLoad attr Return ListLoad NameLoad decorator_list FunctionDef arguments args NameParam NameParam NameParam defaults body If UnaryOpNot AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr Str Return Call NameLoad NameLoad NameLoad Assign NameStore Call NameLoad NameLoad Assign NameStore Call NameLoad SubscriptLoad NameLoad Index Str Assign NameStore SubscriptLoad NameLoad Index Str If CompareNotIn NameLoad AttributeLoad NameLoad attr body Assign NameStore Call AttributeLoad NameLoad attr BinOpMod Str NameLoad Return Call NameLoad NameLoad NameLoad Expr Call AttributeLoad NameLoad attr NameLoad Assign NameStore BoolOpOr SubscriptLoad NameLoad Index Str Str Assign NameStore Call AttributeLoad NameLoad attr keyword ListLoad TupleLoad Str BinOpAdd NameLoad BinOpMod Str NameLoad Return Call NameLoad NameLoad NameLoad decorator_list decorator_list FunctionDef arguments args NameParam defaults body Expr Str If UnaryOpNot Call NameLoad NameLoad Str body Return NameLoad Assign NameStore Call AttributeLoad NameLoad attr If UnaryOpNot CompareIn NameLoad NameLoad body Return NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore Call NameLoad Expr Call AttributeLoad NameLoad attr NameLoad keyword NameLoad Return Call AttributeLoad NameLoad attr decorator_list Assign NameStore ListLoad Str FunctionDef arguments args NameParam defaults body If CompareIs NameLoad NameLoad body Return Call AttributeLoad NameLoad attr keyword Str keyword Str Assign NameStore ListLoad For TupleStore NameStore NameStore Call NameLoad Call AttributeLoad NameLoad attr body If CompareIn NameLoad NameLoad body Continue TryExcept body If CompareNotEq Call AttributeLoad NameLoad attr NameLoad body Assign NameStore Call NameLoad NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr Call NameLoad NameLoad keyword Call AttributeLoad NameLoad attr Call NameLoad NameLoad handlers ExceptHandler type NameLoad name NameStore body Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr keyword Call AttributeLoad NameLoad attr Call NameLoad NameLoad keyword BinOpMod Str NameLoad Return Call AttributeLoad Str attr NameLoad decorator_list FunctionDef arguments args NameParam defaults body If CompareGtE NameLoad BinOpMult Num Num body Assign NameStore BinOpMod Str TupleLoad Call NameLoad BinOpDiv BinOpDiv NameLoad Num Num BinOpMod Call NameLoad BinOpDiv NameLoad Num Num BinOpMod NameLoad Num orelse If CompareGtE NameLoad Num body Assign NameStore BinOpMod Str TupleLoad Call NameLoad BinOpDiv NameLoad Num BinOpMod NameLoad Num orelse If CompareGt NameLoad Num body Assign NameStore BinOpMod Str NameLoad orelse If CompareGt NameLoad Num body Assign NameStore BinOpMod Str NameLoad orelse Assign NameStore BinOpMod Str NameLoad If CompareLt NameLoad Num body Return NameLoad orelse If CompareLt NameLoad Num body Return BinOpMod Str NameLoad orelse Return BinOpMod Str NameLoad decorator_list FunctionDef arguments args NameParam defaults body If CompareGt Call NameLoad NameLoad Num body Return BinOpAdd BinOpAdd SubscriptLoad NameLoad Slice Num Str SubscriptLoad NameLoad Slice Num orelse Return NameLoad decorator_list FunctionDef arguments args NameParam NameParam defaults NameLoad body ImportFrom alias Return Call NameLoad keyword Call NameLoad NameLoad decorator_list Assign AttributeStore NameLoad attr AttributeLoad NameLoad attr FunctionDef arguments args NameParam NameParam defaults Num body Assign NameStore Call NameLoad NameLoad FunctionDef arguments args NameParam NameParam defaults body Import alias If NameLoad body Expr Call AttributeLoad NameLoad attr NameLoad orelse Assign NameStore Num While Num body Print BinOpMod Str TupleLoad NameLoad Call AttributeLoad NameLoad attr Expr Call AttributeLoad NameLoad attr Num AugAssignAdd NameStore Num Expr Call NameLoad Str ListLoad TupleLoad Str Str Return ListLoad BinOpMod Str NameLoad decorator_list Return NameLoad decorator_list
N/A N/A 
Watches the key ``paste.httpserver.thread_pool`` to see how many
threads there are and report on any wedged threads.
 N/A sys N/A cgi N/A time N/A traceback cStringIO StringIO thread get_ident paste httpexceptions paste.request construct_url parse_formvars paste.util.template HTMLTemplate bunch N/A page_template N/A HTMLTemplate 
<html>
 <head>
  <style type="text/css">
   body {
     font-family: sans-serif;
   }
   table.environ tr td {
     border-bottom: #bbb 1px solid;
   }
   table.environ tr td.bottom {
     border-bottom: none;
   }
   table.thread {
     border: 1px solid #000;
     margin-bottom: 1em;
   }
   table.thread tr td {
     border-bottom: #999 1px solid;
     padding-right: 1em;
   }
   table.thread tr td.bottom {
     border-bottom: none;
   }
   table.thread tr.this_thread td {
     background-color: #006;
     color: #fff;
   }
   a.button {
     background-color: #ddd;
     border: #aaa outset 2px;
     text-decoration: none;
     margin-top: 10px;
     font-size: 80%;
     color: #000;
   }
   a.button:hover {
     background-color: #eee;
     border: #bbb outset 2px;
   }
   a.button:active {
     border: #bbb inset 2px;
   }
  </style>
  <title>{{title}}</title>
 </head>
 <body>
  <h1>{{title}}</h1>
  {{if kill_thread_id}}
  <div style="background-color: #060; color: #fff;
              border: 2px solid #000;">
  Thread {{kill_thread_id}} killed
  </div>
  {{endif}}
  <div>Pool size: {{nworkers}}
       {{if actual_workers > nworkers}}
         + {{actual_workers-nworkers}} extra
       {{endif}}
       ({{nworkers_used}} used including current request)<br>
       idle: {{len(track_threads["idle"])}},
       busy: {{len(track_threads["busy"])}},
       hung: {{len(track_threads["hung"])}},
       dying: {{len(track_threads["dying"])}},
       zombie: {{len(track_threads["zombie"])}}</div>

{{for thread in threads}}

<table class="thread">
 <tr {{if thread.thread_id == this_thread_id}}class="this_thread"{{endif}}>
  <td>
   <b>Thread</b>
   {{if thread.thread_id == this_thread_id}}
   (<i>this</i> request)
   {{endif}}</td>
  <td>
   <b>{{thread.thread_id}}
    {{if allow_kill}}
    <form action="{{script_name}}/kill" method="POST"
          style="display: inline">
      <input type="hidden" name="thread_id" value="{{thread.thread_id}}">
      <input type="submit" value="kill">
    </form>
    {{endif}}
   </b>
  </td>
 </tr>
 <tr>
  <td>Time processing request</td>
  <td>{{thread.time_html|html}}</td>
 </tr>
 <tr>
  <td>URI</td>
  <td>{{if thread.uri == 'unknown'}}
      unknown
      {{else}}<a href="{{thread.uri}}">{{thread.uri_short}}</a>
      {{endif}}
  </td>
 <tr>
  <td colspan="2" class="bottom">
   <a href="#" class="button" style="width: 9em; display: block"
      onclick="
        var el = document.getElementById('environ-{{thread.thread_id}}');
        if (el.style.display) {
            el.style.display = '';
            this.innerHTML = '&#9662; Hide environ';
        } else {
            el.style.display = 'none';
            this.innerHTML = '&#9656; Show environ';
        }
        return false
      ">&#9656; Show environ</a>

   <div id="environ-{{thread.thread_id}}" style="display: none">
    {{if thread.environ:}}
    <table class="environ">
     {{for loop, item in looper(sorted(thread.environ.items()))}}
     {{py:key, value=item}}
     <tr>
      <td {{if loop.last}}class="bottom"{{endif}}>{{key}}</td>
      <td {{if loop.last}}class="bottom"{{endif}}>{{value}}</td>
     </tr>
     {{endfor}}
    </table>
    {{else}}
    Thread is in process of starting
    {{endif}}
   </div>

   {{if thread.traceback}}
   <a href="#" class="button" style="width: 9em; display: block"
      onclick="
        var el = document.getElementById('traceback-{{thread.thread_id}}');
        if (el.style.display) {
            el.style.display = '';
            this.innerHTML = '&#9662; Hide traceback';
        } else {
            el.style.display = 'none';
            this.innerHTML = '&#9656; Show traceback';
        }
        return false
      ">&#9656; Show traceback</a>

    <div id="traceback-{{thread.thread_id}}" style="display: none">
      <pre class="traceback">{{thread.traceback}}</pre>
    </div>
    {{endif}}

  </td>
 </tr>
</table>

{{endfor}}

 </body>
</html>
 name watchthreads.page_template WatchThreads N/A object N/A N/A 
    Application that watches the threads in ``paste.httpserver``,
    showing the length each thread has been working on a request.

    If allow_kill is true, then you can kill errant threads through
    this application.

    This application can expose private information (specifically in
    the environment, like cookies), so it should be protected.
     __init__ N/A N/A self allow_kill N/A False N/A N/A N/A self allow_kill allow_kill N/A __call__ N/A N/A self environ start_response N/A N/A N/A N/A paste.httpserver.thread_pool environ N/A N/A N/A start_response 403 Forbidden N/A N/A Content-type text/plain N/A N/A You must use the threaded Paste HTTP server to use this application N/A N/A N/A N/A environ get PATH_INFO /kill N/A N/A N/A N/A self kill environ start_response N/A N/A N/A N/A self show environ start_response N/A show N/A N/A self environ start_response N/A N/A N/A N/A start_response 200 OK N/A N/A Content-type text/html N/A form N/A parse_formvars environ N/A N/A N/A form get kill N/A N/A kill_thread_id N/A form N/A kill N/A N/A kill_thread_id None N/A thread_pool N/A environ N/A paste.httpserver.thread_pool N/A nworkers N/A thread_pool nworkers N/A now N/A N/A time time N/A workers N/A N/A N/A thread_pool worker_tracker items N/A N/A N/A workers sort key N/A N/A N/A v N/A N/A N/A v N/A 1 N/A 0 N/A threads N/A N/A N/A thread_id N/A time_started worker_environ workers N/A N/A thread N/A bunch N/A N/A N/A threads append thread N/A worker_environ N/A N/A N/A thread uri N/A construct_url worker_environ N/A N/A N/A thread uri unknown N/A N/A thread thread_id thread_id N/A N/A thread time_html N/A format_time N/A now time_started N/A N/A thread uri_short N/A shorten N/A thread uri N/A N/A thread environ worker_environ N/A N/A thread traceback N/A traceback_thread thread_id N/A page N/A N/A page_template substitute title Thread Pool Worker Tracker nworkers nworkers actual_workers N/A len N/A thread_pool workers nworkers_used N/A len workers script_name N/A environ N/A SCRIPT_NAME kill_thread_id kill_thread_id allow_kill N/A self allow_kill threads threads this_thread_id N/A get_ident track_threads N/A N/A thread_pool track_threads N/A N/A page N/A kill N/A N/A self environ start_response N/A N/A N/A N/A N/A self allow_kill N/A N/A exc N/A N/A httpexceptions HTTPForbidden Killing threads has not been enabled.  Shame on you for trying! N/A N/A exc environ start_response N/A vars N/A parse_formvars environ N/A thread_id N/A int N/A vars N/A thread_id N/A thread_pool N/A environ N/A paste.httpserver.thread_pool N/A N/A thread_id N/A thread_pool worker_tracker N/A N/A exc N/A N/A httpexceptions PreconditionFailed N/A You tried to kill thread %s, but it is not working on any requests thread_id N/A N/A exc environ start_response N/A N/A N/A thread_pool kill_worker thread_id N/A script_name N/A N/A environ N/A SCRIPT_NAME / N/A exc N/A N/A httpexceptions HTTPFound headers N/A N/A Location N/A script_name N/A ?kill=%s thread_id N/A N/A exc environ start_response N/A N/A traceback_thread N/A N/A thread_id N/A N/A N/A 
    Returns a plain-text traceback of the given thread, or None if it
    can't get a traceback.
     N/A N/A N/A hasattr sys _current_frames N/A N/A None N/A frames N/A N/A sys _current_frames N/A N/A N/A thread_id frames N/A N/A None N/A frame N/A frames N/A thread_id N/A out N/A StringIO N/A N/A N/A traceback print_stack frame file out N/A N/A N/A out getvalue N/A N/A hide_keys N/A paste.httpserver.thread_pool format_environ N/A N/A environ N/A N/A N/A N/A environ None N/A N/A N/A N/A environ_template substitute key --- value No environment registered for this thread yet N/A environ_rows N/A N/A N/A key value N/A sorted N/A N/A environ items N/A N/A N/A key hide_keys N/A N/A N/A N/A N/A N/A N/A N/A key upper key N/A N/A value N/A repr value N/A N/A N/A environ_rows append N/A N/A environ_template substitute key N/A N/A cgi escape N/A str key value N/A N/A cgi escape N/A str value N/A N/A N/A Exception N/A e N/A N/A N/A N/A environ_rows append N/A N/A environ_template substitute key N/A N/A cgi escape N/A str key value N/A Error in <code>repr()</code>: %s e N/A N/A N/A join environ_rows N/A format_time N/A N/A time_length N/A N/A N/A N/A time_length N/A 60 60 N/A N/A time_string N/A %i:%02i:%02i N/A N/A int N/A N/A time_length 60 60 N/A N/A int N/A time_length 60 60 N/A time_length 60 N/A N/A N/A time_length 120 N/A N/A time_string N/A %i:%02i N/A N/A int N/A time_length 60 N/A time_length 60 N/A N/A N/A time_length 60 N/A N/A time_string N/A %i sec time_length N/A N/A N/A time_length 1 N/A N/A time_string N/A %0.1f sec time_length N/A N/A time_string N/A %0.2f sec time_length N/A N/A time_length 5 N/A N/A time_string N/A N/A N/A time_length 120 N/A N/A N/A <span style="color: #900">%s</span> time_string N/A N/A N/A <span style="background-color: #600; color: #fff">%s</span> time_string N/A shorten N/A N/A s N/A N/A N/A N/A N/A len s 60 N/A N/A N/A N/A N/A s N/A 40 ... N/A s N/A -10 N/A N/A s N/A make_watch_threads N/A N/A global_conf allow_kill N/A False N/A paste.deploy.converters asbool N/A N/A WatchThreads allow_kill N/A asbool allow_kill N/A N/A N/A make_watch_threads __doc__ N/A WatchThreads __doc__ make_bad_app N/A N/A global_conf pause N/A 0 N/A N/A pause N/A int pause bad_app N/A N/A environ start_response N/A N/A N/A thread N/A pause N/A N/A N/A N/A time sleep pause N/A N/A count 0 N/A 1 N/A N/A N/A I'm alive %s (%s) N/A count N/A N/A thread get_ident N/A N/A N/A time sleep 10 N/A count 1 N/A N/A start_response 200 OK N/A N/A content-type text/plain N/A N/A N/A OK, paused %s seconds pause N/A N/A bad_app N/A