diff options
Diffstat (limited to 'backend/taskqueue/queue.go')
| -rw-r--r-- | backend/taskqueue/queue.go | 65 |
1 files changed, 2 insertions, 63 deletions
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, ) |
