update DB table

This commit is contained in:
2025-12-28 03:46:11 +01:00
parent de08431e53
commit 1ae11b02ce
3 changed files with 11 additions and 4 deletions

View File

@@ -139,9 +139,12 @@ def run_worker():
checkout_cmd = f"./TPF/gitea_repo_controller.sh checkout {queue.source}"
run_command_with_logging(checkout_cmd, queue_log)
# Clean up any orphaned QEMU processes
run_command_with_logging("pkill -f qemu-system-xtensa || true", queue_log)
# 1-5 Build software and run QEMU
# We stop when we see the multicore app start message
build_cmd = f"/bin/bash -c 'source $HOME/esp/esp-idf/export.sh && cd TPF/Sensor_hub_repo && idf.py build && idf.py qemu'"
build_cmd = f"/bin/bash -c 'export PYTHONUNBUFFERED=1 && source $HOME/esp/esp-idf/export.sh && cd TPF/Sensor_hub_repo && idf.py build && idf.py qemu'"
run_command_with_logging(build_cmd, queue_log, stop_string="cpu_start: Multicore app")
# 9- Loop for each task
@@ -162,7 +165,7 @@ def run_worker():
# It must be executed from TPF/Sensor_hub_repo with IDF sourced
script_path = os.path.abspath("./TPF/scenario_execution.py")
repo_dir = os.path.abspath("./TPF/Sensor_hub_repo")
cmd = f"/bin/bash -c 'source $HOME/esp/esp-idf/export.sh && python3 {script_path} {queue.id} {task.scenario_path} {task.id}'"
cmd = f"/bin/bash -c 'export PYTHONUNBUFFERED=1 && source $HOME/esp/esp-idf/export.sh && python3 {script_path} {queue.id} {task.scenario_path} {task.id}'"
task_dir = os.path.join(queue_dir, task.id)
os.makedirs(task_dir, exist_ok=True)