def status_check()

in src/data_load/load.py [0:0]


def status_check():
    with open(LOG_FILENAME) as f:
        run_id_list = [run_id.rstrip() for run_id in f]

    logger.debug(f"list of run-ids: {run_id_list}")

    results = []
    for run_id in run_id_list:
        workflow_status = send_status_check_request(run_id)
        if workflow_status is not None:
            status = workflow_status.get(STATUS)
            if status == "running":
                results.append({
                    RUN_ID: run_id,
                    STATUS: status})
            else:
                start_time = workflow_status.get(START_TIME)
                end_time = workflow_status.get(END_TIME)
                time_taken = -1000
                if start_time is not None and end_time is not None:
                    time_taken = end_time - start_time
                logger.info(f"Workflow {status}: {run_id}")
                results.append({
                    RUN_ID: run_id,
                    END_TIME: end_time,
                    START_TIME: start_time,
                    STATUS: status,
                    TIME_TAKEN: time_taken / 1000})
        else:
            results.append({
                RUN_ID: run_id,
                STATUS: "Unable To fetch status"})

    return results