mirror of
https://github.com/ash-project/ash_hq.git
synced 2024-09-17 03:43:39 +12:00
improvement: various configuration fixes and flame fixes
This commit is contained in:
parent
ff0ee38a3a
commit
5c40226d2e
4 changed files with 16 additions and 11 deletions
|
@ -85,7 +85,7 @@ if config_env() == :prod do
|
|||
|
||||
config :flame, :backend, FLAME.FlyBackend
|
||||
config :flame, FLAME.FlyBackend, token: System.fetch_env!("FLY_API_TOKEN")
|
||||
config :flame, :terminator, shutdown_timeout: :timer.seconds(120)
|
||||
config :flame, :terminator, shutdown_timeout: :timer.minutes(10)
|
||||
|
||||
# The secret key base is used to sign/encrypt cookies and other secrets.
|
||||
# A default value is used in config/dev.exs and config/test.exs but you
|
||||
|
|
|
@ -25,7 +25,7 @@ defmodule AshHq.Application do
|
|||
!flame_parent && Supervisor.child_spec({Finch, name: Swoosh.Finch}, id: Swoosh.Finch),
|
||||
AshHq.Vault,
|
||||
# Start the Ecto repository
|
||||
!flame_parent && AshHq.Repo,
|
||||
AshHq.Repo,
|
||||
AshHq.SqliteRepo,
|
||||
# Start the Telemetry supervisor
|
||||
AshHqWeb.Telemetry,
|
||||
|
@ -34,8 +34,8 @@ defmodule AshHq.Application do
|
|||
# Start the Endpoint (http/https)
|
||||
!flame_parent && AshHqWeb.Endpoint,
|
||||
{AshHq.Docs.Library.Agent, nil},
|
||||
{Cluster.Supervisor, [topologies, [name: AshHq.ClusterSupervisor]]},
|
||||
!flame_parent && {Haystack.Storage.ETS, storage: AshHq.Docs.Indexer.storage()},
|
||||
# !flame_parent && {Cluster.Supervisor, [topologies, [name: AshHq.ClusterSupervisor]]},
|
||||
{Haystack.Storage.ETS, storage: AshHq.Docs.Indexer.storage()},
|
||||
!flame_parent && AshHq.Docs.Indexer,
|
||||
!flame_parent && AshHq.Github.Monitor,
|
||||
!flame_parent && oban_worker(),
|
||||
|
|
|
@ -53,9 +53,13 @@ defmodule AshHq.Docs.Library do
|
|||
|
||||
change fn changeset, _ ->
|
||||
Ash.Changeset.around_transaction(changeset, fn changeset, func ->
|
||||
FLAME.call(AshHq.ImporterPool, fn ->
|
||||
func.(changeset)
|
||||
end)
|
||||
FLAME.call(
|
||||
AshHq.ImporterPool,
|
||||
fn ->
|
||||
func.(changeset)
|
||||
end,
|
||||
timeout: :timer.minutes(10)
|
||||
)
|
||||
end)
|
||||
end
|
||||
|
||||
|
|
|
@ -1,6 +1,7 @@
|
|||
#!/bin/sh
|
||||
|
||||
ip=$(grep fly-local-6pn /etc/hosts | cut -f 1)
|
||||
export RELEASE_DISTRIBUTION=name
|
||||
export RELEASE_NODE=$FLY_APP_NAME@$ip
|
||||
export ELIXIR_ERL_OPTIONS="-proto_dist inet6_tcp"
|
||||
export ERL_AFLAGS="-proto_dist inet6_tcp"
|
||||
export ECTO_IPV6="true"
|
||||
export DNS_CLUSTER_QUERY="${FLY_APP_NAME}.internal"
|
||||
export RELEASE_DISTRIBUTION="name"
|
||||
export RELEASE_NODE="${FLY_APP_NAME}-${FLY_IMAGE_REF##*-}@${FLY_PRIVATE_IP}"
|
Loading…
Reference in a new issue