Some records will be randomly skipped
This commit is contained in:
@@ -73,12 +73,13 @@ async def event_import_reg(
|
||||
if loop_count > loop_limit: break
|
||||
|
||||
# if rand
|
||||
log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
rand_number = random.choices(['HEADS', 'TAILS'], [3, 7])[0] # 70% chance to process this record!
|
||||
# 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}')
|
||||
if rand_number == 'HEADS':
|
||||
log.info('Skipping this record this time run.')
|
||||
continue
|
||||
log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
# log.setLevel(logging.WARNING) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
|
||||
log.warning(f'BEGIN: **** *** ** * Impexium registrant import loop #{loop_count} * ** *** ****')
|
||||
# ISHLT 2022 used event_registrant.get('registrantTypeCode') for the registration type
|
||||
@@ -600,8 +601,12 @@ async def event_import_reg(
|
||||
event_badge_id = event_person_result.get('event_badge_id')
|
||||
event_person_profile_id = event_person_result.get('event_person_profile_id')
|
||||
|
||||
log.setLevel(logging.DEBUG) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
# event_person_data.pop('allow_tracking') # Leave this alone as a backup reference?
|
||||
# event_person_data['event_badge'].pop('allow_tracking') # We do not want to override their onsite selection
|
||||
# log.debug('Allow Tracking:')
|
||||
log.debug(event_person_data['event_badge'].get('allow_tracking', 'allow_tracking NOT FOUND'))
|
||||
event_person_data['event_badge'].pop('allow_tracking') # We do not want to override their onsite selection
|
||||
log.setLevel(logging.INFO) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
|
||||
|
||||
log.info(f'Found Event Person. Updating existing... Event Person ID: {event_person_id}')
|
||||
if create_event_person_obj_result := create_update_event_person_obj_v4(
|
||||
|
||||
Reference in New Issue
Block a user