Merged in feature/pc-functionality (pull request #835)
bug fix for pc module * bug fix for pc module Approved-by: Katon Minhas
This commit is contained in:
committed by
Katon Minhas
parent
87f3d2f4f0
commit
6679bf7f47
@@ -228,7 +228,8 @@ def main(testing=False, test_params={}):
|
||||
if config.WRITE_TO_S3:
|
||||
doczy_output_for_pc = io_utils.write_s3(FINAL_RESULT_DF, "", run_timestamp, "final")
|
||||
if not ERROR_RESULT_DF.empty:
|
||||
doczy_output_for_pc = io_utils.write_s3(ERROR_RESULT_DF, "", run_timestamp, "error")
|
||||
io_utils.write_s3(ERROR_RESULT_DF, "", run_timestamp, "error")
|
||||
logging.warning(f"{len(ERROR_RESULT_DF)} files failed processing - error results written to S3")
|
||||
|
||||
# Export usage and cost tracking data to S3 only if both dataframes have data
|
||||
if not per_file_usage_df.empty and not batch_summary_df.empty:
|
||||
@@ -238,11 +239,16 @@ def main(testing=False, test_params={}):
|
||||
else:
|
||||
doczy_output_for_pc = io_utils.write_local(FINAL_RESULT_DF, "", run_timestamp, "final")
|
||||
if not ERROR_RESULT_DF.empty:
|
||||
doczy_output_for_pc = io_utils.write_local(ERROR_RESULT_DF, "", run_timestamp, "error")
|
||||
io_utils.write_local(ERROR_RESULT_DF, "", run_timestamp, "error")
|
||||
logging.warning(f"{len(ERROR_RESULT_DF)} files failed processing - error results written locally")
|
||||
|
||||
if config.PERFORM_PARENT_CHILD_MAPPING:
|
||||
with timing_utils.timed_block("parent_child_mapping", log_level="INFO"):
|
||||
parent_child_main.main(doczy_output_for_pc)
|
||||
if FINAL_RESULT_DF.empty:
|
||||
logging.warning("Skipping Parent-Child mapping: No successful results to process (FINAL_RESULT_DF is empty)")
|
||||
else:
|
||||
logging.info(f"Starting Parent-Child mapping with {len(FINAL_RESULT_DF)} records from: {doczy_output_for_pc}")
|
||||
with timing_utils.timed_block("parent_child_mapping", log_level="INFO"):
|
||||
parent_child_main.main(doczy_output_for_pc)
|
||||
|
||||
# Export usage and cost tracking data locally only if both dataframes have data
|
||||
if not per_file_usage_df.empty and not batch_summary_df.empty:
|
||||
|
||||
Reference in New Issue
Block a user