Skip to content
This repository has been archived by the owner on Feb 26, 2020. It is now read-only.

Commit

Permalink
Simplified the code
Browse files Browse the repository at this point in the history
Signed-off-by: Adam Dybbroe <adam.dybbroe@smhi.se>
  • Loading branch information
adybbroe committed Feb 11, 2015
1 parent e1b7934 commit a95fca4
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions bin/pps_runner.py
Expand Up @@ -163,11 +163,7 @@ def reset_job_registry(objdict, key):
def terminate_process(popen_obj, scene):
"""Terminate a Popen process"""
if popen_obj.returncode == None:
popen_obj.terminate()
import time
time.sleep(2)
if popen_obj.poll() == None:
popen_obj.kill()
popen_obj.kill()
LOG.info(
"Process timed out and pre-maturely terminated. Scene: " + str(scene))
else:
Expand Down

0 comments on commit a95fca4

Please sign in to comment.