From 1e6df136d8202c8adf65948527f4c3e7583b338c Mon Sep 17 00:00:00 2001 From: nsfisis Date: Tue, 4 Mar 2025 22:55:01 +0900 Subject: websocket to polling --- backend/taskqueue/queue.go | 65 ++-------------------------------------------- 1 file changed, 2 insertions(+), 63 deletions(-) (limited to 'backend/taskqueue/queue.go') diff --git a/backend/taskqueue/queue.go b/backend/taskqueue/queue.go index 30fe265..b348fca 100644 --- a/backend/taskqueue/queue.go +++ b/backend/taskqueue/queue.go @@ -20,82 +20,21 @@ func (q *Queue) Close() { q.client.Close() } -func (q *Queue) EnqueueTaskCreateSubmissionRecord( - gameID int, - userID int, - code string, - codeSize int, - codeHash MD5HexHash, -) error { - task, err := newTaskCreateSubmissionRecord( - gameID, - userID, - code, - codeSize, - codeHash, - ) - if err != nil { - return err - } - _, err = q.client.Enqueue(task) - return err -} - -func (q *Queue) EnqueueTaskCompileSwiftToWasm( - gameID int, - userID int, - code string, - codeHash MD5HexHash, - submissionID int, -) error { - task, err := newTaskCompileSwiftToWasm( - gameID, - userID, - code, - codeHash, - submissionID, - ) - if err != nil { - return err - } - _, err = q.client.Enqueue(task) - return err -} - -func (q *Queue) EnqueueTaskCompileWasmToNativeExecutable( - gameID int, - userID int, - codeHash MD5HexHash, - submissionID int, -) error { - task, err := newTaskCompileWasmToNativeExecutable( - gameID, - userID, - codeHash, - submissionID, - ) - if err != nil { - return err - } - _, err = q.client.Enqueue(task) - return err -} - func (q *Queue) EnqueueTaskRunTestcase( gameID int, userID int, - codeHash MD5HexHash, submissionID int, testcaseID int, + code string, stdin string, stdout string, ) error { task, err := newTaskRunTestcase( gameID, userID, - codeHash, submissionID, testcaseID, + code, stdin, stdout, ) -- cgit v1.2.3-70-g09d2