Dolda2000 GitWeb
/
ashd.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
python: Added a safety timeout in the new-thread wait loop.
[ashd.git]
/
python3
/
ashd-wsgi3
diff --git
a/python3/ashd-wsgi3
b/python3/ashd-wsgi3
index
a07ac8d
..
de6c20e
100755
(executable)
--- a/
python3/ashd-wsgi3
+++ b/
python3/ashd-wsgi3
@@
-1,19
+1,19
@@
#!/usr/bin/python3
#!/usr/bin/python3
-import sys, os, getopt,
threading,
socket, logging, time, locale, collections
-import ashd.
proto, ashd.util, ashd.perf
, ashd.serve
+import sys, os, getopt, socket, logging, time, locale, collections
+import ashd.
util
, ashd.serve
try:
import pdm.srv
except:
pdm = None
def usage(out):
try:
import pdm.srv
except:
pdm = None
def usage(out):
- out.write("usage: ashd-wsgi3 [-hAL] [-m PDM-SPEC] [-p MODPATH] [-t REQUEST-HANDLER[:PAR[=VAL](,PAR[=VAL])...]] HANDLER-MODULE [ARGS...]\n")
+ out.write("usage: ashd-wsgi3 [-hAL] [-m PDM-SPEC] [-p MODPATH] [-
l REQLIMIT] [-
t REQUEST-HANDLER[:PAR[=VAL](,PAR[=VAL])...]] HANDLER-MODULE [ARGS...]\n")
hspec = "free", {}
modwsgi_compat = False
setlog = True
hspec = "free", {}
modwsgi_compat = False
setlog = True
-opts, args = getopt.getopt(sys.argv[1:], "+hALp:t:m:")
+opts, args = getopt.getopt(sys.argv[1:], "+hALp:t:
l:
m:")
for o, a in opts:
if o == "-h":
usage(sys.stdout)
for o, a in opts:
if o == "-h":
usage(sys.stdout)
@@
-24,6
+24,8
@@
for o, a in opts:
setlog = False
elif o == "-A":
modwsgi_compat = True
setlog = False
elif o == "-A":
modwsgi_compat = True
+ elif o == "-l":
+ hspec = "free", {"max": a, "abort": "10"}
elif o == "-t":
hspec = ashd.serve.parsehspec(a)
elif o == "-m":
elif o == "-t":
hspec = ashd.serve.parsehspec(a)
elif o == "-m":