(infinite) timeouts in long running jobs with gevent.subprocess

Skip to first unread message

James WH

May 2, 2020, 9:52:48 AM5/2/20
to gevent: coroutine-based Python network library
I am quite new to gevent and I am looking to run a long running job(a large physics simulation) using `gevent.subprocess` method, and I have come across this `timeout` argument in the docs with:
[1] check_call
[2] call
[3] check_output

Should `timeout=None` be specified for inifinite timeout? Related to this, I also have another question: which of the above methods are best suited to running long jobs(I require confirmation that the job ran successfully)? They all seem pretty much the same to a naive person like me (other than that in one you can get the output of the process). Is there specific advise for this?

Thank you authors+everyone for this awesome package.

best wishes,

Kevin Tewouda

May 3, 2020, 2:09:46 PM5/3/20
to gev...@googlegroups.com
Hi James,
if you have intention to run a large CPU program, I will recommend you to use gipc. This is appropriate for CPU-intensive programs since it will not block the event loop.
Should `timeout=None` be specified for inifinite timeout?  
timeout=None means there is no timeout at all. Often, I think it is much easier to use a construct like `with Timeout(seconds)` on a block of code. You can read more about here

Hope this will help you to begin with gevent :)

Best regards

You received this message because you are subscribed to the Google Groups "gevent: coroutine-based Python network library" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gevent+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/gevent/419a9ff3-bd04-493c-aa6a-683473fcd3d4%40googlegroups.com.

Tewouda T. R. Kevin
Ingénieur informatique options génie logiciel et réseaux informatiques à 3IL
Titulaire d'un diplôme post master en télécoms à Télécoms Paris Tech
Développeur python à Gandi
Reply all
Reply to author
0 new messages