unias / docklet

OS for Virtual Private Cloud
https://unias.github.io/docklet/
BSD 3-Clause "New" or "Revised" License
240 stars 46 forks source link

Refine container job creation #392

Closed wwt17 closed 5 years ago

wwt17 commented 5 years ago

https://github.com/unias/docklet/blob/5c1a55964a61109023b429e6756ec2cd64bdd976/src/worker/taskcontroller.py#L354 It's better to replace the subprocess.Popen here by subprocess.run(..., timeout=timeout). Benifit: No need to use while for timing. Timing becomes more precise, efficient and elegant.

FirmlyReality commented 5 years ago

It's a good advice. We'll accept it. Thanks~