update DB table
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user