mirror of
https://github.com/livebook-dev/livebook.git
synced 2025-11-11 14:42:39 +08:00
Warn when Hubs cannot be started
This commit is contained in:
parent
c24a4f4f7f
commit
5ac14c18bb
1 changed files with 9 additions and 1 deletions
|
|
@ -5,6 +5,8 @@ defmodule Livebook.Hubs do
|
||||||
alias Livebook.Hubs.{Broadcasts, Metadata, Personal, Provider, Team}
|
alias Livebook.Hubs.{Broadcasts, Metadata, Personal, Provider, Team}
|
||||||
alias Livebook.Secrets.Secret
|
alias Livebook.Secrets.Secret
|
||||||
|
|
||||||
|
require Logger
|
||||||
|
|
||||||
@namespace :hubs
|
@namespace :hubs
|
||||||
@supervisor Livebook.HubsSupervisor
|
@supervisor Livebook.HubsSupervisor
|
||||||
|
|
||||||
|
|
@ -186,7 +188,13 @@ defmodule Livebook.Hubs do
|
||||||
|
|
||||||
defp connect_hub(hub) do
|
defp connect_hub(hub) do
|
||||||
if child_spec = Provider.connection_spec(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
|
end
|
||||||
|
|
||||||
:ok
|
:ok
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue