From 12fe0de684de3665dbc6a1ad8e7d08ae8136fee6 Mon Sep 17 00:00:00 2001 From: Zsolt Ero Date: Thu, 12 Sep 2024 13:00:23 +0200 Subject: [PATCH] better logging --- modules/http_host/http_host_lib/mount.py | 2 +- modules/http_host/http_host_lib/sync.py | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/modules/http_host/http_host_lib/mount.py b/modules/http_host/http_host_lib/mount.py index bdfe6f9..acfc962 100644 --- a/modules/http_host/http_host_lib/mount.py +++ b/modules/http_host/http_host_lib/mount.py @@ -47,7 +47,7 @@ def create_fstab(): mnt_folder.mkdir(exist_ok=True, parents=True) fstab_new.append(f'{btrfs_file} {mnt_folder} btrfs loop,ro 0 0\n') - print(f' created fstab entry for {btrfs_file} -> {mnt_folder}') + print(f' created fstab entry for {mnt_folder}') with open('/etc/fstab') as fp: fstab_orig = [l for l in fp.readlines() if f'{config.mnt_dir}/' not in l] diff --git a/modules/http_host/http_host_lib/sync.py b/modules/http_host/http_host_lib/sync.py index 82152d2..e38efd5 100644 --- a/modules/http_host/http_host_lib/sync.py +++ b/modules/http_host/http_host_lib/sync.py @@ -81,7 +81,7 @@ def auto_clean_btrfs(): if len(versions_to_keep) == 1 and len(local_versions) >= 2: versions_to_keep.add(local_versions[-2]) - print(f' keeping versions for {area}: {sorted(versions_to_keep)}') + print(f' keeping runs for {area}: {sorted(versions_to_keep)}') versions_to_remove = set(local_versions).difference(versions_to_keep) @@ -89,6 +89,6 @@ def auto_clean_btrfs(): # Interesting bit: linux allows us to remove the disk image file for a mount # while the mount is still being used. # We delete the disk image, update nginx config and only then unmount the /mnt dir. - print(f' removing version for {area}: {version}') + print(f' removing runs for {area}: {version}') version_dir = config.runs_dir / area / version shutil.rmtree(version_dir)