File tree Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Expand file tree Collapse file tree 1 file changed +3
-1
lines changed Original file line number Diff line number Diff line change @@ -62,6 +62,7 @@ const handleSuccessForSubmission = function (result: RunResponse) {
62
62
// send a post request to callback
63
63
( async ( ) => {
64
64
// 1. upload the result to s3 and get the url
65
+ const code = result . stderr ? 400 : 200
65
66
const { url} = await upload ( result )
66
67
67
68
// 2. save the url in db
@@ -74,7 +75,7 @@ const handleSuccessForSubmission = function (result: RunResponse) {
74
75
} )
75
76
76
77
// make the callback request
77
- await axios . post ( job . callback , { id : result . id , outputs : [ url ] } )
78
+ await axios . post ( job . callback , { id : result . id , code , outputs : [ url ] } )
78
79
} ) ( )
79
80
break ;
80
81
}
@@ -138,6 +139,7 @@ const getRunPoolElement = function (body: RunRequestBody, res: Response): RunPoo
138
139
* HTTP/1.1 200 OK
139
140
* {
140
141
* "id": 10,
142
+ * "code": 200,
141
143
* "outputs": ["http://localhost/judge-submissions/file.json"]
142
144
* }
143
145
*/
You can’t perform that action at this time.
0 commit comments