mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-10-23 11:57:02 +08:00
Add support for accessing beam paths from the runtime (#2639)
This commit is contained in:
parent
130e94eb7f
commit
3f02e0f30b
1 changed files with 12 additions and 0 deletions
|
@ -372,6 +372,18 @@ defmodule Livebook.Runtime.Evaluator.IOProxy do
|
|||
{result, state}
|
||||
end
|
||||
|
||||
defp io_request(:livebook_get_beam_paths, state) do
|
||||
result =
|
||||
with ebin_path when is_binary(ebin_path) <- state.ebin_path,
|
||||
:ok <- File.mkdir_p(ebin_path) do
|
||||
{:ok, [state.ebin_path]}
|
||||
else
|
||||
_ -> {:error, :not_available}
|
||||
end
|
||||
|
||||
{result, state}
|
||||
end
|
||||
|
||||
defp io_request({:livebook_monitor_clients, pid}, state) do
|
||||
client_ids = Evaluator.ClientTracker.monitor_clients(state.client_tracker, pid)
|
||||
{{:ok, client_ids}, state}
|
||||
|
|
Loading…
Add table
Reference in a new issue