Working on all the routes, methods, and models.

This commit is contained in:
Scott Idem
2021-06-18 14:09:07 -04:00
parent bb2f14b67c
commit 938aabb2a8
29 changed files with 941 additions and 335 deletions

View File

@@ -721,11 +721,11 @@ def redis_lookup_id_random(record_id_random:int|str, table_name:str):
r.setex(key_name, datetime.timedelta(minutes=90), value=record_id)
return int(record_id)
else:
log.setLevel(logging.ERROR) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
# log.setLevel(logging.ERROR) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
log.error('The SQL result was not what was expected.')
return False
else:
log.setLevel(logging.ERROR) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
# log.setLevel(logging.ERROR) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
log.error('More than one record may have been found. There may be a duplicate id_random.')
log.error(select_results)
return False
@@ -734,7 +734,7 @@ def redis_lookup_id_random(record_id_random:int|str, table_name:str):
log.info('Record ID random was not found')
return None
log.setLevel(logging.ERROR) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
# log.setLevel(logging.ERROR) # DEBUG, INFO, WARNING, ERROR, EXCEPTION, CRITICAL
log.error('We should not be here. Something unexpected happened.')
return False # Just in case
# ### END ### API Lib General ### redis_lookup_id_random() ###