@@ -89,7 +89,7 @@ def __init__(self, request_id, task_log):
8989 self .file .addHandler (file_handler )
9090
9191
92- def form_video (task , video , talk , start_tc , end_tc , framerate = FRAMERATE , out_dir = OUT_DIR , temp_dir = TEMP_DIR ):
92+ def form_video (task , video , talk , start_tc , end_tc , framerate = FRAMERATE , out_dir = OUT_DIR , temp_dir = TEMP_DIR , log_dir = LOG_DIR ):
9393
9494 temp_dir = Path (temp_dir ).resolve ()
9595 out_dir = Path (out_dir ).resolve ()
@@ -154,7 +154,7 @@ def form_video(task, video, talk, start_tc, end_tc, framerate = FRAMERATE, out_d
154154 output_path = Path .joinpath (Path (out_dir ), output_file )
155155
156156 # Setup log paths
157- job_log_dir = Path .joinpath (Path (LOG_DIR ), Path (str (task .request .id )))
157+ job_log_dir = Path .joinpath (Path (log_dir ), Path (str (task .request .id )))
158158 job_log_dir .mkdir (parents = True , exist_ok = True )
159159 build_log = Path .joinpath (job_log_dir , Path ("main_build.log" ))
160160 loud_log = Path .joinpath (job_log_dir , Path ("loudness_analysis.log" ))
@@ -283,7 +283,7 @@ def form_video(task, video, talk, start_tc, end_tc, framerate = FRAMERATE, out_d
283283
284284 return str (output_path )
285285
286- def ingest_video (input_path , output_dir , framerate = FRAMERATE ):
286+ def ingest_video (input_path , output_dir , framerate = FRAMERATE , log_dir = LOG_DIR ):
287287
288288 start_timestamp = datetime .datetime .now ().strftime ("%Y%m%d-%H%M%S" )
289289 input_file = os .path .basename (input_path )
@@ -302,7 +302,7 @@ def ingest_video(input_path, output_dir, framerate = FRAMERATE):
302302 logger .debug (ffmpeg_args )
303303
304304 log_file = Path (input_file + start_timestamp + ".log" )
305- log_path = Path .joinpath (Path (LOG_DIR ), log_file )
305+ log_path = Path .joinpath (Path (log_dir ), log_file )
306306
307307 with open (log_path , "w+" ) as error_log :
308308 subprocess .run (ffmpeg_args , stderr = error_log )
0 commit comments