update DB table

This commit is contained in:
2025-12-28 00:47:17 +01:00
parent bc2ab5d799
commit db8ea58f6d
3 changed files with 6 additions and 2 deletions

View File

@@ -6,7 +6,8 @@ After=network.target
User=asf
Group=asf
WorkingDirectory=/home/asf/testarena_backend
Environment="PATH=/home/asf/testarena_backend/venv/bin"
Environment="PATH=/home/asf/testarena_backend/venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
Environment="IDF_PATH=/home/asf/esp/esp-idf"
Environment="DATABASE_URL=sqlite:////home/asf/testarena/testarena.db"
ExecStart=/home/asf/testarena_backend/venv/bin/uvicorn testarena_app.main:app --host 0.0.0.0 --port 8000
Restart=always

View File

@@ -6,7 +6,8 @@ After=network.target testarena-app.service
User=asf
Group=asf
WorkingDirectory=/home/asf/testarena_backend
Environment="PATH=/home/asf/testarena_backend/venv/bin"
Environment="PATH=/home/asf/testarena_backend/venv/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
Environment="IDF_PATH=/home/asf/esp/esp-idf"
Environment="DATABASE_URL=sqlite:////home/asf/testarena/testarena.db"
ExecStart=/home/asf/testarena_backend/venv/bin/python3 -m testarena_app.worker
Restart=always

View File

@@ -33,6 +33,8 @@ import datetime
def run_command_with_logging(cmd, log_file, cwd=None, env=None):
"""Runs a command, logs output to file and stdout with ISO timestamps."""
if env is None:
env = os.environ.copy()
with open(log_file, "a") as f:
process = subprocess.Popen(
cmd,