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) {
6262 // send a post request to callback
6363 ( async ( ) => {
6464 // 1. upload the result to s3 and get the url
65+ const code = result . stderr ? 400 : 200
6566 const { url} = await upload ( result )
6667
6768 // 2. save the url in db
@@ -74,7 +75,7 @@ const handleSuccessForSubmission = function (result: RunResponse) {
7475 } )
7576
7677 // 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 ] } )
7879 } ) ( )
7980 break ;
8081 }
@@ -138,6 +139,7 @@ const getRunPoolElement = function (body: RunRequestBody, res: Response): RunPoo
138139 * HTTP/1.1 200 OK
139140 * {
140141 * "id": 10,
142+ * "code": 200,
141143 * "outputs": ["http://localhost/judge-submissions/file.json"]
142144 * }
143145 */
You can’t perform that action at this time.
0 commit comments