Limit Confex loop count

This commit is contained in:
2023-05-09 11:32:10 -04:00
parent 916cca1d73
commit c2c59374b3

View File

@@ -37,6 +37,9 @@ async def import_event_session_list(
event_id: str = Query(..., min_length=11, max_length=22), # For AAPOR: 9jW-Db-SF-wt (1478 2023-05); x2H2P2MYlXU (1447 2022-05) event_id: str = Query(..., min_length=11, max_length=22), # For AAPOR: 9jW-Db-SF-wt (1478 2023-05); x2H2P2MYlXU (1447 2022-05)
# Account ID For AAPOR: j5EBhRDqPuw # Account ID For AAPOR: j5EBhRDqPuw
begin_loop: int = 0,
end_loop: int = 250,
return_detail: bool = False, return_detail: bool = False,
commons: Common_Route_Params = Depends(common_route_params), commons: Common_Route_Params = Depends(common_route_params),
@@ -65,10 +68,13 @@ async def import_event_session_list(
# BEGIN: Loop through the sessions pulled from Confex # BEGIN: Loop through the sessions pulled from Confex
start_loop = begin_loop
loop_count = 0 loop_count = 0
loop_limit = 220 # 200 loop_limit = end_loop # 200
event_session_summary_li = [] event_session_summary_li = []
for event_session in event_session_li: for event_session in event_session_li:
# if loop_count < start_loop: continue
if loop_count > start_loop: continue
if loop_count > loop_limit: break if loop_count > loop_limit: break
log.warning(f'BEGIN: **** *** ** * Confex event session import loop #{loop_count} * ** *** ****') log.warning(f'BEGIN: **** *** ** * Confex event session import loop #{loop_count} * ** *** ****')