mirror of
https://github.com/fly-apps/live_beats.git
synced 2024-11-21 23:50:59 +00:00
Start whispher if on local backend
This commit is contained in:
parent
3ad60d5f7f
commit
ded7df70ba
1 changed files with 2 additions and 1 deletions
|
@ -21,10 +21,11 @@ defmodule LiveBeats.Application do
|
||||||
def start(_type, _args) do
|
def start(_type, _args) do
|
||||||
parent = FLAME.Parent.get()
|
parent = FLAME.Parent.get()
|
||||||
LiveBeats.MediaLibrary.attach()
|
LiveBeats.MediaLibrary.attach()
|
||||||
|
whisper_serving? = parent || FLAME.Backend.impl() != FLAME.FlyBackend
|
||||||
|
|
||||||
children =
|
children =
|
||||||
[
|
[
|
||||||
{Nx.Serving, name: LiveBeats.WhisperServing, serving: load_serving()},
|
whisper_serving? && {Nx.Serving, name: LiveBeats.WhisperServing, serving: load_serving()},
|
||||||
!parent && {DNSCluster, query: Application.get_env(:wps, :dns_cluster_query) || :ignore},
|
!parent && {DNSCluster, query: Application.get_env(:wps, :dns_cluster_query) || :ignore},
|
||||||
{Task.Supervisor, name: LiveBeats.TaskSupervisor},
|
{Task.Supervisor, name: LiveBeats.TaskSupervisor},
|
||||||
# Start the Ecto repository
|
# Start the Ecto repository
|
||||||
|
|
Loading…
Reference in a new issue