Skip to content

Commit 8322f90

Browse files
committed
submissions
1 parent fc0229d commit 8322f90

File tree

1 file changed

+16
-4
lines changed

1 file changed

+16
-4
lines changed

src/worker.py

Lines changed: 16 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,8 @@ def get_submissions(db_path: Path) -> Dict[str, Dict[str, Any]]:
134134
with sqlite3.connect(db_path) as conn:
135135
conn.row_factory = sqlite3.Row
136136
cursor = conn.cursor()
137-
cursor.execute('SELECT * FROM results')
137+
# cursor.execute('SELECT * FROM results')
138+
cursor.execute('SELECT SubmissionID, UserID, SubmissionDate, SubmissionReference FROM results')
138139

139140
submissions = {}
140141
for row in cursor.fetchall():
@@ -275,15 +276,26 @@ def execute_query(params: ContainerParams) -> bool:
275276
# print("No chat messages found in the database!")
276277
# save_stats_to_json({}, params.stats_path)
277278

279+
# def process_results(params: ContainerParams) -> None:
280+
# """Process query results and generate stats file."""
281+
# chats = get_submission_chats(params.db_path)
282+
283+
# if chats:
284+
# print(f"Found {len(chats)} chats in the database!")
285+
# save_stats_to_json(chats, params.stats_path)
286+
# else:
287+
# print("No chats found in the database!")
288+
# save_stats_to_json({}, params.stats_path)
289+
278290
def process_results(params: ContainerParams) -> None:
279291
"""Process query results and generate stats file."""
280-
chats = get_submission_chats(params.db_path)
292+
chats = get_submissions(params.db_path)
281293

282294
if chats:
283-
print(f"Found {len(chats)} chats in the database!")
295+
print(f"Found {len(chats)} submissions in the database!")
284296
save_stats_to_json(chats, params.stats_path)
285297
else:
286-
print("No chats found in the database!")
298+
print("No submissions found in the database!")
287299
save_stats_to_json({}, params.stats_path)
288300

289301
def main() -> None:

0 commit comments

Comments
 (0)