This is necessary because this will be launched in a new task. Since we
cannot use the object from a different session, we have to fetch the
builder again.
Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
self.builder.disconnected()
async def on_message(self, message):
+ # Fetch the builder again, because this is being executed as a separate task
+ # and therefore we cannot use the object from the previous session.
+ builder = await self.backend.builders.get_by_name(self.builder.name)
+
# Decode message
message = self._decode_json_message(message)