Add STORAGE_PATH to configuration

This commit is contained in:
Salamandar 2024-07-15 10:54:26 +02:00
parent 4251f3fbbc
commit 7dfaf5dcfa
2 changed files with 5 additions and 1 deletions

View file

@ -28,6 +28,7 @@ MONTHLY_JOBS = True
WORKER_COUNT = 1 WORKER_COUNT = 1
YNH_BRANCH = "unstable" YNH_BRANCH = "unstable"
DIST = "bullseye" DIST = "bullseye"
STORAGE_PATH = "/data/yunorunner_data"
``` ```
### Cli tool ### Cli tool

3
run.py
View file

@ -643,6 +643,9 @@ async def run_job(worker, job):
+ ":/usr/local/bin", # This is because lxc/lxd is in /usr/local/bin + ":/usr/local/bin", # This is because lxc/lxd is in /usr/local/bin
} }
if hasattr(app.config, "STORAGE_PATH"):
env["YNH_PACKAGE_CHECK_STORAGE_DIR"] = app.config.STORAGE_PATH
begin = datetime.now() begin = datetime.now()
begin_human = begin.strftime("%d/%m/%Y - %H:%M:%S") begin_human = begin.strftime("%d/%m/%Y - %H:%M:%S")
msg = ( msg = (