From efac5b04490fa29288fd64c85223b96a94e61086 Mon Sep 17 00:00:00 2001 From: Jakob Ketterl Date: Tue, 8 Dec 2020 00:28:34 +0100 Subject: [PATCH] change job decoder error handling so errors reflect in metrics --- owrx/audio.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/owrx/audio.py b/owrx/audio.py index 330b88b..89956fd 100644 --- a/owrx/audio.py +++ b/owrx/audio.py @@ -194,10 +194,11 @@ class AudioWriter(object): try: rc = decoder.wait(timeout=10) if rc != 0: - logger.warning("decoder return code: %i", rc) + raise RuntimeError("decoder return code: {0}".format(rc)) except subprocess.TimeoutExpired: logger.warning("subprocess (pid=%i}) did not terminate correctly; sending kill signal.", decoder.pid) decoder.kill() + raise def start(self): (self.wavefilename, self.wavefile) = self.getWaveFile()