aboutsummaryrefslogtreecommitdiffhomepage
path: root/backend/game/hub.go
diff options
context:
space:
mode:
Diffstat (limited to 'backend/game/hub.go')
-rw-r--r--backend/game/hub.go14
1 files changed, 7 insertions, 7 deletions
diff --git a/backend/game/hub.go b/backend/game/hub.go
index 7c06e05..9e1194b 100644
--- a/backend/game/hub.go
+++ b/backend/game/hub.go
@@ -138,7 +138,7 @@ func (hub *gameHub) run() {
}
}
-func (hub *gameHub) sendExecResultMessage(playerID int, testcaseID nullable.Nullable[int], status string, stdout string, stderr string) {
+func (hub *gameHub) sendExecResult(playerID int, testcaseID nullable.Nullable[int], status string, stdout string, stderr string) {
hub.sendToPlayer(playerID, &playerMessageS2CExecResult{
Type: playerMessageTypeS2CExecResult,
Data: playerMessageS2CExecResultPayload{
@@ -218,7 +218,7 @@ func (hub *gameHub) processTaskResults() {
case *taskqueue.TaskResultCompileSwiftToWasm:
err := hub.processTaskResultCompileSwiftToWasm(taskResult)
if err != nil {
- hub.sendExecResultMessage(
+ hub.sendExecResult(
taskResult.TaskPayload.UserID(),
nullable.NewNullNullable[int](),
err.Status,
@@ -234,7 +234,7 @@ func (hub *gameHub) processTaskResults() {
case *taskqueue.TaskResultCompileWasmToNativeExecutable:
err := hub.processTaskResultCompileWasmToNativeExecutable(taskResult)
if err != nil {
- hub.sendExecResultMessage(
+ hub.sendExecResult(
taskResult.TaskPayload.UserID(),
nullable.NewNullNullable[int](),
err.Status,
@@ -247,7 +247,7 @@ func (hub *gameHub) processTaskResults() {
nullable.NewNullNullable[int](),
)
} else {
- hub.sendExecResultMessage(
+ hub.sendExecResult(
taskResult.TaskPayload.UserID(),
nullable.NewNullNullable[int](),
"success",
@@ -270,7 +270,7 @@ func (hub *gameHub) processTaskResults() {
Stderr: "",
})
if err != nil {
- hub.sendExecResultMessage(
+ hub.sendExecResult(
taskResult.TaskPayload.UserID(),
nullable.NewNullableWithValue(int(taskResult.TaskPayload.TestcaseID)),
"internal_error",
@@ -286,7 +286,7 @@ func (hub *gameHub) processTaskResults() {
continue
}
if err1 != nil {
- hub.sendExecResultMessage(
+ hub.sendExecResult(
taskResult.TaskPayload.UserID(),
nullable.NewNullableWithValue(int(taskResult.TaskPayload.TestcaseID)),
aggregatedStatus,
@@ -294,7 +294,7 @@ func (hub *gameHub) processTaskResults() {
err1.Stderr,
)
} else {
- hub.sendExecResultMessage(
+ hub.sendExecResult(
taskResult.TaskPayload.UserID(),
nullable.NewNullableWithValue(int(taskResult.TaskPayload.TestcaseID)),
"success",