Work on Confex API loop
This commit is contained in:
@@ -37,7 +37,7 @@ 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,
|
begin_loop: int = 1,
|
||||||
end_loop: int = 250,
|
end_loop: int = 250,
|
||||||
|
|
||||||
return_detail: bool = False,
|
return_detail: bool = False,
|
||||||
@@ -70,12 +70,19 @@ async def import_event_session_list(
|
|||||||
|
|
||||||
start_loop = begin_loop
|
start_loop = begin_loop
|
||||||
loop_count = 0
|
loop_count = 0
|
||||||
|
log.warning(f'INITIAL LOOP COUNT {loop_count}')
|
||||||
loop_limit = end_loop # 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:
|
||||||
|
loop_count = loop_count + 1
|
||||||
|
log.warning(f'START LOOP COUNT {loop_count}')
|
||||||
|
if loop_count > loop_limit:
|
||||||
|
log.warning(f'BREAKING ON LOOP COUNT {loop_count}')
|
||||||
|
break
|
||||||
# if loop_count < start_loop: continue
|
# if loop_count < start_loop: continue
|
||||||
if loop_count > start_loop: continue
|
if loop_count > start_loop:
|
||||||
if loop_count > loop_limit: break
|
log.warning(f'Continuing with LOOP COUNT {loop_count}')
|
||||||
|
continue
|
||||||
log.warning(f'BEGIN: **** *** ** * Confex event session import loop #{loop_count} * ** *** ****')
|
log.warning(f'BEGIN: **** *** ** * Confex event session import loop #{loop_count} * ** *** ****')
|
||||||
|
|
||||||
confex_session_id = event_session.get('id')
|
confex_session_id = event_session.get('id')
|
||||||
@@ -545,7 +552,7 @@ async def import_event_session_list(
|
|||||||
|
|
||||||
event_session_summary_li.append(event_session_summary)
|
event_session_summary_li.append(event_session_summary)
|
||||||
|
|
||||||
loop_count = loop_count + 1
|
# loop_count = loop_count + 1
|
||||||
|
|
||||||
# if confex_session_id == '1110':
|
# if confex_session_id == '1110':
|
||||||
# log.setLevel(logging.DEBUG)
|
# log.setLevel(logging.DEBUG)
|
||||||
|
|||||||
Reference in New Issue
Block a user