Skip to content

Instantly share code, notes, and snippets.

@martincabrera
Created February 22, 2021 17:27
Show Gist options
  • Save martincabrera/a767906925da0c07009bb288838a2efc to your computer and use it in GitHub Desktop.
Save martincabrera/a767906925da0c07009bb288838a2efc to your computer and use it in GitHub Desktop.
Elixir PythonWorker handle_call function
def handle_call({:optimize, json_input}, _from, pid) do
result = :python.call(pid, :optimize, :optimize, [json_input])
{:reply, {:ok, result}, pid}
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment