add sysargv

main
yz 2 years ago
parent 3947210152
commit f231a14827

@ -191,8 +191,8 @@ def run_pool_dates_by_code_init_n_group(typ='mink', code_gp_amt=10, date_gp_amt=
code_list = all_code_dict[code_init] code_list = all_code_dict[code_init]
if typ == 'mink': if typ == 'mink':
# logger.info('Running mink') # logger.info('Running mink')
print(date_list) logger.info(date_list)
print(code_list) logger.info(code_list)
run_pool_add_by_datelist_codeinit( run_pool_add_by_datelist_codeinit(
'mink', date_list, code_list, if_check) 'mink', date_list, code_list, if_check)
@ -210,15 +210,21 @@ if __name__ == '__main__':
tic = time.perf_counter() tic = time.perf_counter()
typ = 'mink' if len(sys.argv)>1:
st_d = '20220104' typ,st_d,en_d,if_check,split_code_into_howmany_groups_no,split_date_into_howmany_groups = sys.argv[1:]
en_d = '20221031' if_check=int(if_check)
if_check = 0 split_code_into_howmany_groups_no = int(split_code_into_howmany_groups_no)
split_code_into_howmany_groups_no = 10 split_date_into_howmany_groups=int(split_date_into_howmany_groups)
split_date_into_howmany_groups = 5 else:
typ = 'mink'
logger.info( st_d = '20210104'
f"Going to run {typ} from {st_d} to {en_d} with if_check dupliactes={if_check} in {running_which_env}, plz check if this info is correct.\n\n\n\n") en_d = '20211231'
if_check = 0
split_code_into_howmany_groups_no = 5
split_date_into_howmany_groups = 20
logger.warning(
f"Going to run *{typ}* from {st_d} to {en_d} with if_check dupliactes={if_check} in *{running_which_env}*, plz check if this info is correct.\n\n\n\n")
run_pool_dates_by_code_init_n_group(typ=typ, code_gp_amt=split_code_into_howmany_groups_no, run_pool_dates_by_code_init_n_group(typ=typ, code_gp_amt=split_code_into_howmany_groups_no,
date_gp_amt=split_date_into_howmany_groups, start_date=st_d, end_date=en_d, if_check=if_check, code_dict_by='group') date_gp_amt=split_date_into_howmany_groups, start_date=st_d, end_date=en_d, if_check=if_check, code_dict_by='group')
# run_pool_dates_by_code_init_n_group(typ='mink',group_amount=5) # run_pool_dates_by_code_init_n_group(typ='mink',group_amount=5)

Loading…
Cancel
Save