From 6076f88bb94ecbaad34dda405dbe466bd65e5b25 Mon Sep 17 00:00:00 2001 From: isakal Date: Thu, 4 Jun 2020 22:24:04 +0200 Subject: [PATCH] Add julia executor and enable elixir in api --- api/main.go | 1 + lxc/execute | 3 +++ lxc/executors/elixir | 2 ++ 3 files changed, 6 insertions(+) create mode 100644 lxc/executors/elixir diff --git a/api/main.go b/api/main.go index 9cd0b3e..4c1d0d1 100644 --- a/api/main.go +++ b/api/main.go @@ -70,6 +70,7 @@ func Execute(res http.ResponseWriter, req *http.Request) { "c", "cpp", "c++", "csharp", "cs", "c#", + "elixir", "exs", "go", "java", "julia", "jl", diff --git a/lxc/execute b/lxc/execute index e8a9f50..fab1706 100755 --- a/lxc/execute +++ b/lxc/execute @@ -57,6 +57,9 @@ case "$lang" in "csharp" | "cs" | "c#") bin=csharp ;; +"elixir" | "exs") + bin=elixir + ;; "go") bin=go ;; diff --git a/lxc/executors/elixir b/lxc/executors/elixir new file mode 100644 index 0000000..bee79a4 --- /dev/null +++ b/lxc/executors/elixir @@ -0,0 +1,2 @@ +cd /tmp/$2 +runuser runner$1 -c "cd /tmp/$2 ; cat args.args ; xargs -d '\n' timeout -s KILL 3 elixir code.code"