Skip to content

Commit

Permalink
Logging to debug file copy
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisjkhan committed Dec 31, 2022
1 parent 21fe9c5 commit 3746b2a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
4 changes: 4 additions & 0 deletions cdp_backend/pipeline/event_gather_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"]:
Expand Down
8 changes: 4 additions & 4 deletions cdp_backend/utils/file_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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(
Expand Down

0 comments on commit 3746b2a

Please sign in to comment.