change job decoder error handling so errors reflect in metrics
This commit is contained in:
parent
519155a12f
commit
efac5b0449
@ -194,10 +194,11 @@ class AudioWriter(object):
|
|||||||
try:
|
try:
|
||||||
rc = decoder.wait(timeout=10)
|
rc = decoder.wait(timeout=10)
|
||||||
if rc != 0:
|
if rc != 0:
|
||||||
logger.warning("decoder return code: %i", rc)
|
raise RuntimeError("decoder return code: {0}".format(rc))
|
||||||
except subprocess.TimeoutExpired:
|
except subprocess.TimeoutExpired:
|
||||||
logger.warning("subprocess (pid=%i}) did not terminate correctly; sending kill signal.", decoder.pid)
|
logger.warning("subprocess (pid=%i}) did not terminate correctly; sending kill signal.", decoder.pid)
|
||||||
decoder.kill()
|
decoder.kill()
|
||||||
|
raise
|
||||||
|
|
||||||
def start(self):
|
def start(self):
|
||||||
(self.wavefilename, self.wavefile) = self.getWaveFile()
|
(self.wavefilename, self.wavefile) = self.getWaveFile()
|
||||||
|
Loading…
Reference in New Issue
Block a user