aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/taskqueue/queue.go
diff options
context:
space:
mode:
authornsfisis <nsfisis@gmail.com>2025-03-04 22:55:01 +0900
committernsfisis <nsfisis@gmail.com>2025-03-08 10:12:44 +0900
commit1e6df136d8202c8adf65948527f4c3e7583b338c (patch)
tree7c82476f6bbbc71d72ab7e71e39559eca197fd95 /backend/taskqueue/queue.go
parent54316868c3bec1ff9b04643dfe6c13cf56bf3246 (diff)
downloadiosdc-japan-2025-albatross-1e6df136d8202c8adf65948527f4c3e7583b338c.tar.gz
iosdc-japan-2025-albatross-1e6df136d8202c8adf65948527f4c3e7583b338c.tar.zst
iosdc-japan-2025-albatross-1e6df136d8202c8adf65948527f4c3e7583b338c.zip
websocket to polling
Diffstat (limited to 'backend/taskqueue/queue.go')
-rw-r--r--backend/taskqueue/queue.go65
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,
)