From 171abbc184067befcddbb0363eeaf6ab4ba7ed72 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Sybren=20A=2E=20St=C3=BCvel?= <sybren@stuvel.eu> Date: Fri, 10 Mar 2017 14:00:23 +0100 Subject: [PATCH] Worked around a race condition shutting down. --- flamenco_worker/runner.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/flamenco_worker/runner.py b/flamenco_worker/runner.py index 15e0f991..d6113fec 100644 --- a/flamenco_worker/runner.py +++ b/flamenco_worker/runner.py @@ -410,6 +410,10 @@ class AbstractSubprocessCommand(AbstractCommand): # The process is already stopped, so killing is impossible. That's ok. self._log.debug("The process was already stopped, aborting is impossible. That's ok.") return + except AttributeError: + # This can happen in some race conditions, it's fine. + self._log.debug("The process was not yet started, aborting is impossible. That's ok.") + return retval = await self.proc.wait() self._log.info('The process aborted with status code %s', retval) -- GitLab