Store IOU licence in the secrets directory and disable the check by default

This commit is contained in:
grossmj committed 2024-12-17 16:12:17 +07:00
1 parent 5e1b8814b6
commit 014d3f2ad9
2 files changed
+17 -26

No files matched your search

+6 -10
View File
@@ -572,17 +572,13 @@ class Node:
Start a node
"""
try:
# For IOU we need to send the licence everytime
# For IOU we need to send the licence everytime (if enabled)
if self.node_type == "iou":
license_check = self._project.controller.iou_license.get("license_check", True)
iourc_content = self._project.controller.iou_license.get("iourc_content", None)
# if license_check and not iourc_content:
# raise aiohttp.web.HTTPConflict(text="IOU licence is not configured")
await self.post(
"/start", timeout=240, data={"license_check": license_check, "iourc_content": iourc_content}
)
else:
await self.post("/start", data=data, timeout=240)
license_check = self._project.controller.iou_license.get("license_check")
iourc_content = self._project.controller.iou_license.get("iourc_content")
if license_check:
data = {"license_check": license_check, "iourc_content": iourc_content}
await self.post("/start", data=data, timeout=240)
except asyncio.TimeoutError:
raise ControllerTimeoutError(f"Timeout when starting {self._name}")