new extensions
This commit is contained in:
parent
c55d472a7b
commit
e9c952216b
|
@ -79,8 +79,14 @@ func Execute(res http.ResponseWriter, req *http.Request) {
|
|||
}
|
||||
|
||||
func launch(inbound2 inbound, res http.ResponseWriter){
|
||||
var ext string = "code";
|
||||
|
||||
if inbound2.Language == "go" {
|
||||
ext = "go"
|
||||
}
|
||||
|
||||
// write the code to temp dir
|
||||
filename := fmt.Sprintf("/tmp/%d.code", time.Now().UnixNano())
|
||||
filename := fmt.Sprintf("/tmp/%d." + ext, time.Now().UnixNano())
|
||||
|
||||
ioutil.WriteFile(filename, []byte(inbound2.Source), 0644)
|
||||
|
||||
|
|
|
@ -52,6 +52,7 @@ docker run \
|
|||
-m 16m \
|
||||
--network none \
|
||||
--cpus=".5" \
|
||||
--ulimit nproc=8:16 \
|
||||
--rm \
|
||||
-v $abs:/$file \
|
||||
-v $dir/executors/python2:/executor_python2 \
|
||||
|
|
|
@ -1,3 +1,3 @@
|
|||
#!/bin/sh
|
||||
|
||||
go run $*
|
||||
go run $1
|
||||
|
|
Loading…
Reference in New Issue