Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 10 additions & 10 deletions packages/helpermodules/command.py
Original file line number Diff line number Diff line change
Expand Up @@ -819,6 +819,16 @@ def systemUpdate(self, connection_id: str, payload: dict) -> None:
Pub().pub("openWB/system/update_in_progress", False)
return
parent_file = Path(__file__).resolve().parents[2]
if not SubData.general_data.data.extern and SubData.system_data["system"].data["secondary_auto_update"]:
for cp in SubData.cp_data.values():
# if chargepoint is external_openwb and not the second CP of duo and version is Release
if all(
cp.chargepoint.chargepoint_module.config.type == 'external_openwb',
cp.chargepoint.chargepoint_module.config.configuration.duo_num == 0,
cp.chargepoint.data.get.current_branch == "Release"
):
time.sleep(2)
self.secondaryChargepointUpdate({"data": {"chargepoint": f"cp{cp.chargepoint.num}"}})
if "branch" in payload["data"] and "tag" in payload["data"]:
pub_user_message(
payload, connection_id,
Expand All @@ -833,16 +843,6 @@ def systemUpdate(self, connection_id: str, payload: dict) -> None:
run_command([
str(parent_file / "runs" / "update_self.sh"),
SubData.system_data["system"].data["current_branch"]])
if not SubData.general_data.data.extern and SubData.system_data["system"].data["secondary_auto_update"]:
for cp in SubData.cp_data.values():
# if chargepoint is external_openwb and not the second CP of duo and version is Release
if (
cp.chargepoint.chargepoint_module.config.type == 'external_openwb' and
cp.chargepoint.chargepoint_module.config.configuration.duo_num == 0 and
cp.chargepoint.data.get.current_branch == "Release"
):
time.sleep(2)
self.secondaryChargepointUpdate({"data": {"chargepoint": f"cp{cp.chargepoint.num}"}})

def systemFetchVersions(self, connection_id: str, payload: dict) -> None:
log.info("Fetch versions requested")
Expand Down