From: Michael Tremer Date: Mon, 20 Jun 2022 17:15:46 +0000 (+0000) Subject: builders: Ignore start/stop commands for builders that don't support it X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=528af23e0f13ac0cec45cfa063d8ecc739a53398;p=pbs.git builders: Ignore start/stop commands for builders that don't support it Signed-off-by: Michael Tremer --- diff --git a/src/buildservice/builders.py b/src/buildservice/builders.py index fa1be2e3..6d7a304e 100644 --- a/src/buildservice/builders.py +++ b/src/buildservice/builders.py @@ -582,6 +582,10 @@ class Builder(base.DataObject): await asyncio.to_thread(self._start, wait=wait) def _start(self, wait): + # Requires an instance + if not self.instance: + return + log.info("Starting %s" % self) # Set correct instance type @@ -634,6 +638,10 @@ class Builder(base.DataObject): await asyncio.to_thread(self._stop, wait=wait) def _stop(self, wait): + # Requires an instance + if not self.instance: + return + log.info("Stopping %s" % self) # Send the stop signal