mirror of
https://github.com/livebook-dev/livebook.git
synced 2024-09-20 18:15:56 +08:00
Warn when Hubs cannot be started
This commit is contained in:
parent
c24a4f4f7f
commit
5ac14c18bb
|
@ -5,6 +5,8 @@ defmodule Livebook.Hubs do
|
|||
alias Livebook.Hubs.{Broadcasts, Metadata, Personal, Provider, Team}
|
||||
alias Livebook.Secrets.Secret
|
||||
|
||||
require Logger
|
||||
|
||||
@namespace :hubs
|
||||
@supervisor Livebook.HubsSupervisor
|
||||
|
||||
|
@ -186,7 +188,13 @@ defmodule Livebook.Hubs do
|
|||
|
||||
defp connect_hub(hub) do
|
||||
if child_spec = Provider.connection_spec(hub) do
|
||||
DynamicSupervisor.start_child(@supervisor, child_spec)
|
||||
case DynamicSupervisor.start_child(@supervisor, child_spec) do
|
||||
{:ok, _} ->
|
||||
:ok
|
||||
|
||||
{:error, reason} ->
|
||||
Logger.error("Could not start Hub #{hub.id}: #{Exception.format_exit(reason)}")
|
||||
end
|
||||
end
|
||||
|
||||
:ok
|
||||
|
|
Loading…
Reference in a new issue