# logging starts here# stat = 'Rally Extract - {}'.format(entity_type) logging.info(stat) logging.info('T_PROCESS_RUN.PROCESS_RUN_ID - {}'.format(l_run_id)) c_log.callproc('BMR_LOG.INSERT_PROCESS_RUN_LOG_DTL', (l_run_id, info, stat, 'Log File - ' + str(log_file))) c_log.callproc('BMR_LOG.INSERT_PROCESS_RUN_LOG_DTL', (l_run_id, info, stag + ' - STARTS', '')) # get prepared query for API call cur_sys_config = conn.cursor() try: sys_con, query = prepare_api_query(entity_type, sql_fetch_syscon_test_folder, cur_sys_config) cur_sys_config.close() stat = "Sys_config value to be considered : {}".format(sys_con) logging.info(stat) c_log.callproc('BMR_LOG.INSERT_PROCESS_RUN_LOG_DTL', (l_run_id, info, stag, stat)) except Exception: stat = "Error while fetching sys_config value or preparing the API query." logging.exception(stat) cur_sys_config.close() c_log.callproc('BMR_LOG.INSERT_PROCESS_RUN_LOG_DTL', (l_run_id, err, stag, stat)) c_log.callproc('BMR_LOG.UPDATE_PROCESS_RUN_DTL', (l_run_id, 'F')) c_log.close() conn.close()
l_run_id = l_run[4] # logging starts here# stat = 'Rally Extract - {}'.format(entity_type) logging.info(stat) logging.info('T_PROCESS_RUN.PROCESS_RUN_ID - {}'.format(l_run_id)) c_log.callproc('BMR_LOG.INSERT_PROCESS_RUN_LOG_DTL', (l_run_id, info, stat, 'Log File - ' + str(log_file))) c_log.callproc('BMR_LOG.INSERT_PROCESS_RUN_LOG_DTL', (l_run_id, info, stag + ' - STARTS', '')) # get prepared query for API call cur_sys_config = conn.cursor() try: sys_con, query = prepare_api_query(entity_type, sql_fetch_syscon_rev_hist, cur_sys_config) cur_sys_config.close() stat = "Sys_config value to be considered : {}".format(sys_con) logging.info(stat) c_log.callproc('BMR_LOG.INSERT_PROCESS_RUN_LOG_DTL', (l_run_id, info, stag, stat)) except Exception: stat = "Error while fetching sys_config value or preparing the API query." logging.exception(stat) cur_sys_config.close() c_log.callproc('BMR_LOG.INSERT_PROCESS_RUN_LOG_DTL', (l_run_id, err, stag, stat)) c_log.callproc('BMR_LOG.UPDATE_PROCESS_RUN_DTL', (l_run_id, 'F')) c_log.close() conn.close() hdlr.close()
# calling stored proc to make entry in log table l_run = c_log.callproc('BMR_LOG.INSERT_PROCESS_RUN_DTL', (today, process_id_disc, env, run_stat, 0)) l_run_id = l_run[4] # logging starts here# stat = 'Rally Extract - {}'.format(entity_type) logging.info(stat) logging.info('T_PROCESS_RUN.PROCESS_RUN_ID - {}'.format(l_run_id)) c_log.callproc('BMR_LOG.INSERT_PROCESS_RUN_LOG_DTL', (l_run_id, info, stat, 'Log File - ' + str(log_file))) c_log.callproc('BMR_LOG.INSERT_PROCESS_RUN_LOG_DTL', (l_run_id, info, stag + ' - STARTS', '')) # get prepared query for API call cur_sys_config = conn.cursor() try: sys_con, query = prepare_api_query(entity_type, sql_fetch_syscon_disc, cur_sys_config) cur_sys_config.close() stat = "Sys_config value to be considered : {}".format(sys_con) logging.info(stat) c_log.callproc('BMR_LOG.INSERT_PROCESS_RUN_LOG_DTL', (l_run_id, info, stag, stat)) except Exception: stat = "Error while fetching sys_config value or preparing the API query." logging.exception(stat) cur_sys_config.close() c_log.callproc('BMR_LOG.INSERT_PROCESS_RUN_LOG_DTL', (l_run_id, err, stag, stat)) c_log.callproc('BMR_LOG.UPDATE_PROCESS_RUN_DTL', (l_run_id, 'F')) c_log.close() conn.close() hdlr.close() sys.exit()
l_run_id = l_run[4] # logging starts here# stat = 'Rally Extract - {}'.format(entity_type) logging.info(stat) logging.info('T_PROCESS_RUN.PROCESS_RUN_ID - {}'.format(l_run_id)) c_log.callproc('BMR_LOG.INSERT_PROCESS_RUN_LOG_DTL', (l_run_id, info, stat, 'Log File - ' + str(log_file))) c_log.callproc('BMR_LOG.INSERT_PROCESS_RUN_LOG_DTL', (l_run_id, info, stag + ' - STARTS', '')) # get prepared query for API call try: query = prepare_api_query(entity_type) stat = 'The API query used in the GET call - {} '.format(query) logging.info(stat) c_log.callproc('BMR_LOG.INSERT_PROCESS_RUN_LOG_DTL', (l_run_id, info, stag, stat)) except Exception: stat = "Error while preparing the API query." logging.exception(stat) c_log.callproc('BMR_LOG.INSERT_PROCESS_RUN_LOG_DTL', (l_run_id, err, stag, stat)) c_log.callproc('BMR_LOG.UPDATE_PROCESS_RUN_DTL', (l_run_id, 'F')) c_log.close() conn.close() hdlr.close() sys.exit()
# logging starts here# stat = 'Rally Extract - {}'.format(entity_type) logging.info(stat) logging.info('T_PROCESS_RUN.PROCESS_RUN_ID - {}'.format(l_run_id)) c_log.callproc('BMR_LOG.INSERT_PROCESS_RUN_LOG_DTL', (l_run_id, info, stat, 'Log File - ' + str(log_file))) c_log.callproc('BMR_LOG.INSERT_PROCESS_RUN_LOG_DTL', (l_run_id, info, stag + ' - STARTS', '')) # get prepared query for API call cur_sys_config = conn.cursor() try: sys_con, query = prepare_api_query(entity_type, sql_fetch_syscon_test_case_result, cur_sys_config) cur_sys_config.close() stat = "Sys_config value to be considered : {}".format(sys_con) logging.info(stat) c_log.callproc('BMR_LOG.INSERT_PROCESS_RUN_LOG_DTL', (l_run_id, info, stag, stat)) except Exception: stat = "Error while fetching sys_config value or preparing the API query." logging.exception(stat) cur_sys_config.close() c_log.callproc('BMR_LOG.INSERT_PROCESS_RUN_LOG_DTL', (l_run_id, err, stag, stat)) c_log.callproc('BMR_LOG.UPDATE_PROCESS_RUN_DTL', (l_run_id, 'F')) c_log.close() conn.close()
# calling stored proc to make entry in log table l_run = c_log.callproc('BMR_LOG.INSERT_PROCESS_RUN_DTL', (today, process_id_user_iter_cap, env, run_stat, 0)) l_run_id = l_run[4] # logging starts here# stat = 'Rally Extract - {}'.format(entity_type) logging.info(stat) logging.info('T_PROCESS_RUN.PROCESS_RUN_ID - {}'.format(l_run_id)) c_log.callproc('BMR_LOG.INSERT_PROCESS_RUN_LOG_DTL', (l_run_id, info, stat, 'Log File - ' + str(log_file))) c_log.callproc('BMR_LOG.INSERT_PROCESS_RUN_LOG_DTL', (l_run_id, info, stag + ' - STARTS', '')) # get prepared query for API call cur_sys_config = conn.cursor() try: sys_con, query = prepare_api_query(entity_type, sql_fetch_syscon_user_iter_cap, cur_sys_config) cur_sys_config.close() stat = "Sys_config value to be considered : {}".format(sys_con) logging.info(stat) c_log.callproc('BMR_LOG.INSERT_PROCESS_RUN_LOG_DTL', (l_run_id, info, stag, stat)) except Exception: stat = "Error while fetching sys_config value or preparing the API query." logging.exception(stat) cur_sys_config.close() c_log.callproc('BMR_LOG.INSERT_PROCESS_RUN_LOG_DTL', (l_run_id, err, stag, stat)) c_log.callproc('BMR_LOG.UPDATE_PROCESS_RUN_DTL', (l_run_id, 'F')) c_log.close() conn.close() hdlr.close() sys.exit()
l_run_id = l_run[4] # logging starts here# stat = 'Rally Extract - Starts' logging.info(stat) logging.info('T_PROCESS_RUN.PROCESS_RUN_ID - {}'.format(l_run_id)) c_log.callproc('BMR_LOG.INSERT_PROCESS_RUN_LOG_DTL', (l_run_id, info, stat, 'Log File - ' + str(log_file))) c_log.callproc('BMR_LOG.INSERT_PROCESS_RUN_LOG_DTL', (l_run_id, info, stag + ' - STARTS', '')) # get prepared query for API call cur_sys_config = conn.cursor() try: sys_con, query = prepare_api_query(sql_fetch_syscon_pi, cur_sys_config, entity_type) cur_sys_config.close() stat = "Sys_config value to be considered : {}".format(sys_con) logging.info(stat) c_log.callproc('BMR_LOG.INSERT_PROCESS_RUN_LOG_DTL', (l_run_id, info, stag, stat)) except Exception: stat = "Error while fetching sys_config value or preparing the API query." logging.exception(stat) cur_sys_config.close() c_log.callproc('BMR_LOG.INSERT_PROCESS_RUN_LOG_DTL', (l_run_id, err, stag, stat)) c_log.callproc('BMR_LOG.UPDATE_PROCESS_RUN_DTL', (l_run_id, 'F')) c_log.close() conn.close() hdlr.close()
# logging starts here# stat = 'Rally Extract - {}'.format(entity_type) logging.info(stat) logging.info('T_PROCESS_RUN.PROCESS_RUN_ID - {}'.format(l_run_id)) c_log.callproc('BMR_LOG.INSERT_PROCESS_RUN_LOG_DTL', (l_run_id, info, stat, 'Log File - ' + str(log_file))) c_log.callproc('BMR_LOG.INSERT_PROCESS_RUN_LOG_DTL', (l_run_id, info, stag + ' - STARTS', '')) # get prepared query for API call cur_sys_config = conn.cursor() try: sys_con, query = prepare_api_query(entity_type, sql_fetch_syscon_defect_suite, cur_sys_config) cur_sys_config.close() stat = "Sys_config value to be considered : {}".format(sys_con) logging.info(stat) c_log.callproc('BMR_LOG.INSERT_PROCESS_RUN_LOG_DTL', (l_run_id, info, stag, stat)) except Exception: stat = "Error while fetching sys_config value or preparing the API query." logging.exception(stat) cur_sys_config.close() c_log.callproc('BMR_LOG.INSERT_PROCESS_RUN_LOG_DTL', (l_run_id, err, stag, stat)) c_log.callproc('BMR_LOG.UPDATE_PROCESS_RUN_DTL', (l_run_id, 'F')) c_log.close() conn.close()