Add logging to speaking grading.
This commit is contained in:
6
app.py
6
app.py
@@ -369,7 +369,7 @@ def grade_speaking_task_1():
|
|||||||
delete_files_older_than_one_day(AUDIO_FILES_PATH)
|
delete_files_older_than_one_day(AUDIO_FILES_PATH)
|
||||||
sound_file_name = AUDIO_FILES_PATH + str(uuid.uuid4())
|
sound_file_name = AUDIO_FILES_PATH + str(uuid.uuid4())
|
||||||
logging.info("POST - speaking_task_1 - Received request to grade speaking task 1. "
|
logging.info("POST - speaking_task_1 - Received request to grade speaking task 1. "
|
||||||
"Use this id to track the logs: " + str(request_id))
|
"Use this id to track the logs: " + str(request_id) + " - Request data: " + str(request.get_json()))
|
||||||
try:
|
try:
|
||||||
data = request.get_json()
|
data = request.get_json()
|
||||||
question = data.get('question')
|
question = data.get('question')
|
||||||
@@ -474,7 +474,7 @@ def grade_speaking_task_2():
|
|||||||
delete_files_older_than_one_day(AUDIO_FILES_PATH)
|
delete_files_older_than_one_day(AUDIO_FILES_PATH)
|
||||||
sound_file_name = AUDIO_FILES_PATH + str(uuid.uuid4())
|
sound_file_name = AUDIO_FILES_PATH + str(uuid.uuid4())
|
||||||
logging.info("POST - speaking_task_2 - Received request to grade speaking task 2. "
|
logging.info("POST - speaking_task_2 - Received request to grade speaking task 2. "
|
||||||
"Use this id to track the logs: " + str(request_id))
|
"Use this id to track the logs: " + str(request_id) + " - Request data: " + str(request.get_json()))
|
||||||
try:
|
try:
|
||||||
data = request.get_json()
|
data = request.get_json()
|
||||||
question = data.get('question')
|
question = data.get('question')
|
||||||
@@ -606,7 +606,7 @@ def grade_speaking_task_3():
|
|||||||
request_id = uuid.uuid4()
|
request_id = uuid.uuid4()
|
||||||
delete_files_older_than_one_day(AUDIO_FILES_PATH)
|
delete_files_older_than_one_day(AUDIO_FILES_PATH)
|
||||||
logging.info("POST - speaking_task_3 - Received request to grade speaking task 3. "
|
logging.info("POST - speaking_task_3 - Received request to grade speaking task 3. "
|
||||||
"Use this id to track the logs: " + str(request_id))
|
"Use this id to track the logs: " + str(request_id) + " - Request data: " + str(request.get_json()))
|
||||||
try:
|
try:
|
||||||
data = request.get_json()
|
data = request.get_json()
|
||||||
answers = data.get('answers')
|
answers = data.get('answers')
|
||||||
|
|||||||
Reference in New Issue
Block a user