diff --git a/modules/http_host/http_host_lib/mount.py b/modules/http_host/http_host_lib/mount.py index acfc962..3aa7f19 100644 --- a/modules/http_host/http_host_lib/mount.py +++ b/modules/http_host/http_host_lib/mount.py @@ -12,7 +12,7 @@ def auto_mount(): When finished, /mnt/ofm dir will have all the present tiles.btrfs files mounted in a read-only way. """ - print('running mount') + print('Running auto mount') assert_linux() assert_sudo() @@ -28,6 +28,7 @@ def auto_mount(): def create_fstab(): + print(' creating fstab') fstab_new = [] for area in ['planet', 'monaco']: @@ -40,7 +41,7 @@ def create_fstab(): version_str = version.name btrfs_file = area_dir / version_str / 'tiles.btrfs' if not btrfs_file.is_file(): - print(f" {btrfs_file} doesn't exists, skipping") + print(f" {btrfs_file} doesn't exist, skipping") continue mnt_folder = config.mnt_dir / f'{area}-{version_str}' @@ -60,7 +61,7 @@ def clean_up_mounts(mnt_dir): if not mnt_dir.exists(): return - print(' cleaning up mounts') + print('Cleaning up mounts') # handle deleted files p = subprocess.run(['mount'], capture_output=True, text=True, check=True) diff --git a/modules/http_host/http_host_lib/nginx.py b/modules/http_host/http_host_lib/nginx.py index f12e5df..dfb19c6 100644 --- a/modules/http_host/http_host_lib/nginx.py +++ b/modules/http_host/http_host_lib/nginx.py @@ -8,6 +8,8 @@ from http_host_lib.utils import python_venv_executable def write_nginx_config(): + print('Writing nginx config') + if not config.mnt_dir.exists(): sys.exit(' mount needs to be run first') @@ -166,14 +168,14 @@ def create_version_location( ) -> str: run_dir = config.runs_dir / area / version if not run_dir.is_dir(): - print(f" {run_dir} doesn't exists, skipping") + print(f" {run_dir} doesn't exist, skipping") return '' tilejson_path = run_dir / f'tilejson-{local}.json' metadata_path = mnt_dir / 'metadata.json' if not metadata_path.is_file(): - print(f" {metadata_path} doesn't exists, skipping") + print(f" {metadata_path} doesn't exist, skipping") return '' url_prefix = f'https://{domain}/{area}/{version}' diff --git a/modules/http_host/http_host_lib/sync.py b/modules/http_host/http_host_lib/sync.py index e38efd5..3f6b560 100644 --- a/modules/http_host/http_host_lib/sync.py +++ b/modules/http_host/http_host_lib/sync.py @@ -55,6 +55,8 @@ def auto_clean_btrfs(): 3. If there is no deployed version, then we include the second newest one """ + print('Running auto clean btrfs') + for area in config.areas: area_dir = config.runs_dir / area if not area_dir.is_dir():