Skip to content

Commit

Permalink
file type minor fix
Browse files Browse the repository at this point in the history
  • Loading branch information
star-nox committed Mar 12, 2024
1 parent d39fe2d commit 0c76854
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions ai_ta_backend/service/export_service.py
Original file line number Diff line number Diff line change
Expand Up @@ -213,7 +213,7 @@ def export_convo_history_json(self, course_name: str, from_date='', to_date=''):

if response.count > 500:
# call background task to upload to s3
filename = course_name + '_' + str(uuid.uuid4()) + '_convo_history.json'
filename = course_name + '_' + str(uuid.uuid4()) + '_convo_history.zip'
s3_filepath = f"courses/{course_name}/{filename}"
# background task of downloading data - map it with above ID
executor = ProcessPoolExecutor()
Expand All @@ -227,7 +227,7 @@ def export_convo_history_json(self, course_name: str, from_date='', to_date=''):
last_id = response.data[-1]['id']
total_count = response.count

filename = course_name + '_' + str(uuid.uuid4()) + '_convo_history.csv'
filename = course_name + '_' + str(uuid.uuid4()) + '_convo_history.json'
file_path = os.path.join(os.getcwd(), filename)
curr_count = 0
# Fetch data in batches of 25 from first_id to last_id
Expand Down

0 comments on commit 0c76854

Please sign in to comment.