Fix for Impexium API import adjustments
This commit is contained in:
@@ -297,7 +297,7 @@ def create_update_event_badge_obj_v4(
|
||||
log.info(f'Event Person ID: {event_person_id}')
|
||||
return False
|
||||
|
||||
log.info('Create dictionary or Pydantic object')
|
||||
log.debug('Create dictionary or Pydantic object')
|
||||
log.debug(type(event_badge_dict_obj))
|
||||
if isinstance(event_badge_dict_obj, dict):
|
||||
event_badge_dict = event_badge_dict_obj
|
||||
|
||||
@@ -66,16 +66,17 @@ async def event_import_reg(
|
||||
# BEGIN: Loop through the registrants pulled from Impexium
|
||||
|
||||
loop_count = 0
|
||||
loop_limit = 2500 # 200
|
||||
loop_limit = 4500 # 200
|
||||
event_person_li = []
|
||||
event_person_summary_li = []
|
||||
for event_registrant in event_registrant_li:
|
||||
if loop_count > loop_limit: break
|
||||
|
||||
# if rand
|
||||
# log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
rand_number = random.choices(['HEADS', 'TAILS'], [4, 6])[0] # 70% chance to process this record!
|
||||
log.debug(f'Random Number: {rand_number}')
|
||||
rand_number = None
|
||||
if len(event_registrant_li) > 1500:
|
||||
rand_number = random.choices(['HEADS', 'TAILS'], [4, 6])[0] # 70% chance to process this record!
|
||||
log.debug(f'Random Number: {rand_number}')
|
||||
if rand_number == 'HEADS':
|
||||
log.info('Skipping this record this time run.')
|
||||
continue
|
||||
|
||||
Reference in New Issue
Block a user