From 3746b2a455ea45b14654e464ba112af913e1312f Mon Sep 17 00:00:00 2001 From: Chris Khan Date: Sat, 31 Dec 2022 01:42:05 -0800 Subject: [PATCH] Logging to debug file copy --- cdp_backend/pipeline/event_gather_pipeline.py | 4 ++++ cdp_backend/utils/file_utils.py | 8 ++++---- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/cdp_backend/pipeline/event_gather_pipeline.py b/cdp_backend/pipeline/event_gather_pipeline.py index 559d3136..04dbfc63 100644 --- a/cdp_backend/pipeline/event_gather_pipeline.py +++ b/cdp_backend/pipeline/event_gather_pipeline.py @@ -334,6 +334,10 @@ def convert_video_and_handle_host( trim_video = bool(session.video_start_time or session.video_end_time) + log.info(f"File to trim: {str(video_filepath)}") + log.info(f"File exists: {video_filepath.exists()}") + log.info(f"File stats: {video_filepath.stat()}") + # Convert to mp4 if file isn't of approved web format cdp_will_host = False if ext not in [".mp4", ".webm"]: diff --git a/cdp_backend/utils/file_utils.py b/cdp_backend/utils/file_utils.py index cb4dbd7d..cecf4dcf 100644 --- a/cdp_backend/utils/file_utils.py +++ b/cdp_backend/utils/file_utils.py @@ -238,10 +238,6 @@ def resource_copy( timeout=1800, ).content ) - log.info(f"File complete: {str(dst)}") - log.info(f"URI complete: {str(uri)}") - log.info(f"File exists: {dst.exists()}") - log.info(f"File stats: {dst.stat()}") else: # TODO: Add explicit use of GCS credentials until public read is fixed @@ -719,6 +715,10 @@ def clip_and_reformat_video( output_path = output_path or rename_append_to_stem(video_filepath, "_clipped") + log.info(f"File to trim: {str(video_filepath)}") + log.info(f"File exists: {video_filepath.exists()}") + log.info(f"File stats: {video_filepath.stat()}") + try: ffmpeg_stdout, ffmpeg_stderr = ( ffmpeg.input(