feat: more parts of lua
This commit is contained in:
@@ -105,4 +105,4 @@ defmodule BDS.Scripting do
|
||||
|
||||
Keyword.merge(defaults, opts)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -118,4 +118,4 @@ defmodule BDS.Scripting.JobRunner do
|
||||
{:stop, :normal, state}
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -75,4 +75,4 @@ defmodule BDS.Scripting.JobStore do
|
||||
def handle_call({:runner_for, job_id}, _from, state) do
|
||||
{:reply, Map.get(state.runners, job_id), state}
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -11,4 +11,4 @@ defmodule BDS.Scripting.JobSupervisor do
|
||||
def init(:ok) do
|
||||
DynamicSupervisor.init(strategy: :one_for_one)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -131,4 +131,4 @@ defmodule BDS.Scripting.Lua do
|
||||
defp unwrap_result([]), do: nil
|
||||
defp unwrap_result([value]), do: value
|
||||
defp unwrap_result(values), do: values
|
||||
end
|
||||
end
|
||||
|
||||
@@ -21,4 +21,4 @@ defmodule BDS.Scripting.Runtime do
|
||||
@callback validate(source()) :: :ok | {:error, term()}
|
||||
@callback execute(source(), entrypoint(), args(), [execution_option()]) ::
|
||||
{:ok, term()} | {:error, term()}
|
||||
end
|
||||
end
|
||||
|
||||
@@ -100,4 +100,4 @@ defmodule BDS.Scripting.JobTest do
|
||||
defp wait_for_job(_job_id, _predicate, 0) do
|
||||
flunk("job did not reach expected state")
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
@@ -40,4 +40,4 @@ defmodule BDS.Scripting.LuaTest do
|
||||
assert {:error, {:reductions_exceeded, _count}} =
|
||||
BDS.Scripting.execute(source, "main", [], timeout: 1_000, max_reductions: 100)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user