Re: Twisted Klein idle connection timeout

Tom Most <[email protected]> Mon, 04 Mar 2019 23:25:04 +0000
Newsgroups gmane.comp.python.twisted.web
Message-ID <[email protected]>
--===============6233857093575378635==
Content-Type: multipart/alternative; boundary="----ICPEV9U755EI3RETNVVLPFYTMI6DN2"
Content-Transfer-Encoding: 7bit

------ICPEV9U755EI3RETNVVLPFYTMI6DN2
Content-Type: text/plain;
 charset=utf-8
Content-Transfer-Encoding: quoted-printable

Hi John,

You can accomplish what you're after by wrapping your Klein instance in Si=
te yourself --- =2Erun() is just a shortcut that does this (plus initialize=
 logging)=2E
Call =2Eresource() to get a reource to use as root in the snippet you post=
ed=2E

https://github=2Ecom/twisted/klein/blob/86e34a2ea0f26fc7710851912707ab937d=
0df31d/src/klein/_app=2Epy#L421

---Tom


On March 3, 2019 2:30:16 AM PST, John Aherne <johnaherne@rocs=2Eco=2Euk> w=
rote:
>Klein defaults to the twisted http timeout of 60 seconds=2E
>
>But in twisted web Site setup you can define a timeout parameter to
>change
>this=2E e=2Eg=2E
>
>factory =3D Site(root, timeout=3D300)
>
>I can't see any option to add a parameter in Klein to change this=2E
>
>Is there no option for this or have I just missed the obvious setup
>point=2E
>
>Thanks for any info=2E
>
>
>--=20
>*John Aherne*
>
>
>
>
>*www=2Erocs=2Eco=2Euk <http://www=2Erocs=2Eco=2Euk>*
>020 7223 7567

------ICPEV9U755EI3RETNVVLPFYTMI6DN2
Content-Type: text/html;
 charset=utf-8
Content-Transfer-Encoding: quoted-printable

<html><head></head><body>Hi John,<br>
<br>
You can accomplish what you&#39;re after by wrapping your Klein instance i=
n Site yourself --- =2Erun() is just a shortcut that does this (plus initia=
lize logging)=2E<br>
Call =2Eresource() to get a reource to use as root in the snippet you post=
ed=2E<br>
<br>
<a href=3D"https://github=2Ecom/twisted/klein/blob/86e34a2ea0f26fc77108519=
12707ab937d0df31d/src/klein/_app=2Epy#L421">https://github=2Ecom/twisted/kl=
ein/blob/86e34a2ea0f26fc7710851912707ab937d0df31d/src/klein/_app=2Epy#L421<=
/a><br>
<br>
---Tom<br>
<br><br><div class=3D"gmail_quote">On March 3, 2019 2:30:16 AM PST, John A=
herne &lt;johnaherne@rocs=2Eco=2Euk&gt; wrote:<blockquote class=3D"gmail_qu=
ote" style=3D"margin: 0pt 0pt 0pt 0=2E8ex; border-left: 1px solid rgb(204, =
204, 204); padding-left: 1ex;">
<div dir=3D"ltr"><div dir=3D"ltr">Klein defaults to the twisted http timeo=
ut of 60 seconds=2E<div><br /></div><div>But in twisted web Site setup you =
can define a timeout parameter to change this=2E e=2Eg=2E</div><div><br /><=
/div><div>factory =3D Site(root, timeout=3D300)<br /></div><div><br /></div=
><div>I can't see any option to add a parameter in Klein to change this=2E<=
/div><div><br /></div><div>Is there no option for this or have I just misse=
d the obvious setup point=2E</div><div><br /></div><div>Thanks for any info=
=2E</div><div><br /></div><div><div><br /></div>-- <br /><div dir=3D"ltr" c=
lass=3D"gmail_signature"><b>John Aherne</b><div><b><br /></b><div><b><img s=
rc=3D"http://www=2Erocs=2Eco=2Euk/Images/rocs_logo_sig=2Egif" /><br /></b><=
/div><div><b><br /></b></div><div><div><b><a href=3D"http://www=2Erocs=2Eco=
=2Euk" target=3D"_blank">www=2Erocs=2Eco=2Euk</a><br /></b></div></div></di=
v><div>020 7223 7567</div></div></div></div></div>
</blockquote></div></body></html>
------ICPEV9U755EI3RETNVVLPFYTMI6DN2--

--===============6233857093575378635==
Content-Type: text/plain; charset="utf-8"
MIME-Version: 1.0
Content-Transfer-Encoding: base64
Content-Disposition: inline

X19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX19fX18KVHdpc3RlZC13
ZWIgbWFpbGluZyBsaXN0ClR3aXN0ZWQtd2ViQHR3aXN0ZWRtYXRyaXguY29tCmh0dHBzOi8vdHdp
c3RlZG1hdHJpeC5jb20vY2dpLWJpbi9tYWlsbWFuL2xpc3RpbmZvL3R3aXN0ZWQtd2ViCg==

--===============6233857093575378635==--