update DB table
This commit is contained in:
@@ -6,7 +6,8 @@ After=network.target
|
|||||||
User=asf
|
User=asf
|
||||||
Group=asf
|
Group=asf
|
||||||
WorkingDirectory=/home/asf/testarena_backend
|
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"
|
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
|
ExecStart=/home/asf/testarena_backend/venv/bin/uvicorn testarena_app.main:app --host 0.0.0.0 --port 8000
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|||||||
@@ -6,7 +6,8 @@ After=network.target testarena-app.service
|
|||||||
User=asf
|
User=asf
|
||||||
Group=asf
|
Group=asf
|
||||||
WorkingDirectory=/home/asf/testarena_backend
|
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"
|
Environment="DATABASE_URL=sqlite:////home/asf/testarena/testarena.db"
|
||||||
ExecStart=/home/asf/testarena_backend/venv/bin/python3 -m testarena_app.worker
|
ExecStart=/home/asf/testarena_backend/venv/bin/python3 -m testarena_app.worker
|
||||||
Restart=always
|
Restart=always
|
||||||
|
|||||||
@@ -33,6 +33,8 @@ import datetime
|
|||||||
|
|
||||||
def run_command_with_logging(cmd, log_file, cwd=None, env=None):
|
def run_command_with_logging(cmd, log_file, cwd=None, env=None):
|
||||||
"""Runs a command, logs output to file and stdout with ISO timestamps."""
|
"""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:
|
with open(log_file, "a") as f:
|
||||||
process = subprocess.Popen(
|
process = subprocess.Popen(
|
||||||
cmd,
|
cmd,
|
||||||
|
|||||||
Reference in New Issue
Block a user