logging fixes

This commit is contained in:
Zsolt Ero
2024-09-12 04:12:13 +02:00
parent fb75f214d1
commit 1a5fa5b208
4 changed files with 8 additions and 6 deletions

View File

@@ -1,4 +1,5 @@
#!/usr/bin/env python3 #!/usr/bin/env python3
from datetime import datetime, timezone
import click import click
from http_host_lib.assets import ( from http_host_lib.assets import (
@@ -14,6 +15,9 @@ from http_host_lib.sync import auto_clean_btrfs, full_sync
from http_host_lib.versions import fetch_version_files from http_host_lib.versions import fetch_version_files
now = datetime.now(timezone.utc)
@click.group() @click.group()
def cli(): def cli():
""" """
@@ -96,6 +100,8 @@ def sync(force):
On a new server this also takes care of everything, no need to run anything manually. On a new server this also takes care of everything, no need to run anything manually.
""" """
print(f'---\n{now}\nrunning full_sync')
full_sync(force) full_sync(force)

View File

@@ -16,10 +16,6 @@ def full_sync(force=False):
On a new server this also takes care of everything, no need to run anything manually. On a new server this also takes care of everything, no need to run anything manually.
""" """
print('---')
print('running full_sync')
print(datetime.now(timezone.utc))
assert_linux() assert_linux()
assert_sudo() assert_sudo()

View File

@@ -69,7 +69,7 @@ def set_version(area, version):
Set versions for a given area Set versions for a given area
""" """
print(f'{now} starting set-version {area}') print(f'---\n{now}\nstarting set-version {area}')
check_and_set_version(area, version) check_and_set_version(area, version)

View File

@@ -12,7 +12,7 @@ def check_and_set_version(area, version):
return return
version = versions[-1] version = versions[-1]
print(f'---\nLatest version on bucket: {area} {version}') print(f' Latest version on bucket: {area} {version}')
if not check_all_hosts(area, version): if not check_all_hosts(area, version):
return return