Skip to content

Commit

Permalink
core: services: log_zipper: Fix info message
Browse files Browse the repository at this point in the history
Signed-off-by: Patrick José Pereira <[email protected]>
  • Loading branch information
patrickelectric committed Jul 26, 2023
1 parent 423896b commit 1adcd44
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion core/services/log_zipper/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ def main() -> None:
if not glob.has_magic(args.path) and not os.path.isdir(args.path):
parser.error(f"Invalid path: {args.path}")

period_seconds = args.period
# We need to transform from minutes to seconds, since this is what time and st_mtime returns
max_age_seconds = args.max_age_minutes * 60

Expand All @@ -69,7 +70,7 @@ def main() -> None:
zip_files(local_files, zipped_file)
logger.info(f"Created zip archive {zipped_file} with {len(local_files)} files.")

logger.info(f"Sleeping for {str(datetime.timedelta(minutes=max_age))}...")
logger.info(f"Sleeping for {str(datetime.timedelta(seconds=period_seconds))}...")
time.sleep(args.period)


Expand Down

0 comments on commit 1adcd44

Please sign in to comment.