In case we have a connection, but it has gone away, we will just pretend
that the builder is offline.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
self, json.dumps(message, indent=4, sort_keys=True))
# Write the message to the control connection
- return self.connection.write_message(message)
+ try:
+ return self.connection.write_message(message)
+
+ # If the connection broke, we raise BuilderNotOnlineError
+ except tornado.websocket.WebSocketClosedError as e:
+ raise BuilderNotOnlineError(self) from e
# Uploads