def count_where_gisid_assigned(logname):
    logger = MC.setup_logging(logname)
    logger.info("Starting program...")

    pp_workspace = MC.get_preprod_workspace()
    p_workspace = MC.get_prod_workspace()

    pp_dict = CC.count_fcs(pp_workspace, CC.count_fc_gisid_assigned)
    p_dict = CC.count_fcs(p_workspace, CC.count_fc_gisid_assigned)

    CC.write_r2d1_results(logname, logger, pp_dict, p_dict)

    logger.info("Finished program")
def copy_prod(log_name, state_of_interest):
    p_workspace = MC.get_prod_workspace()
    r2d2_prod = MC.get_r2d2_prod_workspace(state_of_interest)

    copy_gps(log_name, p_workspace, r2d2_prod, state_of_interest)
                    running_total += 1
                    gisid += 1
                    if cursor_counter > 0 and cursor_counter % 10000 == 0:
                        print cursor_counter
        MC.write_gisid_seed(gisid)
        edit.stopOperation()
        edit.stopEditing(True)

    logger.info(fc + "|" + str(running_total))


#
# start of program
#
log_name = 'migrate3'
logger = MC.setup_logging(log_name)
logger.info("Starting program...")

pp_workspace = MC.get_preprod_workspace()
p_workspace = MC.get_prod_workspace()

logger.info(pp_workspace)
assign_workspace_gisids(pp_workspace)

logger.info(p_workspace)
assign_workspace_gisids(p_workspace)

MC.send_finished_email(log_name)

logger.info("Finished program")
    del sCur, iCur

    mc.write_gisid_seed(gisid)

    # time.sleep(10)
    # MC.enable_editor_tracking(target_workspace, fc)


#
# start of program
#
log_name = 'migrate6'
logger = mc.setup_logging(log_name)
logger.info("Starting program...")

mc.arcfm_disable()

states = ["OH", "PA", "VA"]

for gps_state in states:
    p_workspace = mc.get_prod_workspace()
    r2d2_prod = mc.get_r2d2_prod_workspace(gps_state)
    logger.info(p_workspace + "-->" + r2d2_prod)

    move_workarea(logger, p_workspace, r2d2_prod, gps_state)

mc.arcfm_cleanup()

logger.info("Finished program")