Ñò
ô†³Kc
@ s d Z d d k Z d d k Z d d k Z d d k Z d d k l Z d d k l Z d d k l
Z
d d k l Z l
Z
d d k l Z l Z e d d d
ƒZ d e f d „ ƒ YZ d
„ Z d g Z d „ Z d „ Z d „ Z e d „ Z e i e _ d d „ Z d S( sv
Watches the key ``paste.httpserver.thread_pool`` to see how many
threads there are and report on any wedged threads.
iÿÿÿÿN( t StringIO( t get_ident( t httpexceptions( t
construct_urlt parse_formvars( t HTMLTemplatet bunchsv
{{title}}
{{title}}
{{if kill_thread_id}}
Thread {{kill_thread_id}} killed
{{endif}}
Pool size: {{nworkers}}
{{if actual_workers > nworkers}}
+ {{actual_workers-nworkers}} extra
{{endif}}
({{nworkers_used}} used including current request)
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"])}}
{{for thread in threads}}
Thread
{{if thread.thread_id == this_thread_id}}
(this request)
{{endif}} |
{{thread.thread_id}}
{{if allow_kill}}
{{endif}}
|
Time processing request |
{{thread.time_html|html}} |
URI |
{{if thread.uri == 'unknown'}}
unknown
{{else}}{{thread.uri_short}}
{{endif}}
|
▸ Show environ
{{if thread.environ:}}
{{for loop, item in looper(sorted(thread.environ.items()))}}
{{py:key, value=item}}
{{key}} |
{{value}} |
{{endfor}}
{{else}}
Thread is in process of starting
{{endif}}
{{if thread.traceback}}
▸ Show traceback
{{endif}}
|
{{endfor}}
t names watchthreads.page_templatet WatchThreadsc B s5 e Z d Z e d „ Z d „ Z d „ Z d „ Z RS( si
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.
c C s
| | _ d S( N( t
allow_kill( t selfR ( ( s<