mirror of
https://github.com/ash-project/ash_hq.git
synced 2024-09-08 13:51:05 +12:00
chore: update now that we aren't using litefs
This commit is contained in:
parent
86c96c31a9
commit
c6bdfa64b7
5 changed files with 22 additions and 23 deletions
|
@ -49,4 +49,4 @@ COPY ./rel ./rel
|
|||
RUN mix release --overwrite
|
||||
RUN mkdir indexes
|
||||
COPY ./litefs.yml ./litefs.yml
|
||||
ENTRYPOINT litefs mount
|
||||
CMD ["_build/prod/rel/ash_hq/bin/ash_hq", "start"]
|
||||
|
|
|
@ -16,7 +16,7 @@ defmodule AshHq.Application do
|
|||
children =
|
||||
[
|
||||
{FLAME.Pool,
|
||||
name: AshHq.ImporterPool, min: 0, max: 1, max_concurrency: 1, idle_shutdown_after: 30_000},
|
||||
name: AshHq.ImporterPool, min: 0, max: 1, max_concurrency: 6, idle_shutdown_after: 30_000},
|
||||
!flame_parent && Supervisor.child_spec({Finch, name: AshHq.Finch}, id: AshHq.Finch),
|
||||
!flame_parent && Supervisor.child_spec({Finch, name: Swoosh.Finch}, id: Swoosh.Finch),
|
||||
AshHq.Vault,
|
||||
|
|
|
@ -4,6 +4,6 @@ defmodule AshHq.Docs.Importer do
|
|||
"""
|
||||
|
||||
def import() do
|
||||
AshOban.Test.schedule_and_run_triggers(AshHq.Docs.Library)
|
||||
AshOban.schedule_and_run_triggers(AshHq.Docs.Library)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -4,13 +4,6 @@ defmodule AshHq.Docs.Library do
|
|||
data_layer: AshPostgres.DataLayer,
|
||||
extensions: [AshOban]
|
||||
|
||||
postgres do
|
||||
table "libraries"
|
||||
repo AshHq.Repo
|
||||
|
||||
migration_defaults module_prefixes: "[]", skip_versions: "[]"
|
||||
end
|
||||
|
||||
actions do
|
||||
defaults [:create, :update, :destroy]
|
||||
|
||||
|
@ -51,18 +44,17 @@ defmodule AshHq.Docs.Library do
|
|||
]
|
||||
end
|
||||
|
||||
# litefs can't write from another node, so we had to turn this off
|
||||
# change fn changeset, _ ->
|
||||
# Ash.Changeset.around_transaction(changeset, fn changeset, func ->
|
||||
# FLAME.call(
|
||||
# AshHq.ImporterPool,
|
||||
# fn ->
|
||||
# func.(changeset)
|
||||
# end,
|
||||
# timeout: :timer.minutes(10)
|
||||
# )
|
||||
# end)
|
||||
# end
|
||||
change fn changeset, _ ->
|
||||
Ash.Changeset.around_transaction(changeset, fn changeset, func ->
|
||||
FLAME.call(
|
||||
AshHq.ImporterPool,
|
||||
fn ->
|
||||
func.(changeset)
|
||||
end,
|
||||
timeout: :timer.minutes(10)
|
||||
)
|
||||
end)
|
||||
end
|
||||
|
||||
manual AshHq.Docs.Library.Actions.Import
|
||||
end
|
||||
|
@ -131,6 +123,13 @@ defmodule AshHq.Docs.Library do
|
|||
end
|
||||
end
|
||||
|
||||
postgres do
|
||||
table "libraries"
|
||||
repo AshHq.Repo
|
||||
|
||||
migration_defaults module_prefixes: "[]", skip_versions: "[]"
|
||||
end
|
||||
|
||||
code_interface do
|
||||
define_for AshHq.Docs
|
||||
|
||||
|
|
2
mix.lock
2
mix.lock
|
@ -13,7 +13,7 @@
|
|||
"ash_csv": {:git, "https://github.com/ash-project/ash_csv.git", "7f47b820077619ccb7340fbede0c4fd1b5313a17", []},
|
||||
"ash_graphql": {:git, "https://github.com/ash-project/ash_graphql.git", "cf57747d79f848608252ab167d74bb59aaef2345", []},
|
||||
"ash_json_api": {:git, "https://github.com/ash-project/ash_json_api.git", "31ece4fad9920c7e45c600d38ac82218296c4612", []},
|
||||
"ash_oban": {:git, "https://github.com/ash-project/ash_oban.git", "36a441f78195f4f4e656f6a0cf268084704ff174", []},
|
||||
"ash_oban": {:git, "https://github.com/ash-project/ash_oban.git", "bfacb4572cda947bf6d5de27a075922b5d2e6c36", []},
|
||||
"ash_phoenix": {:git, "https://github.com/ash-project/ash_phoenix.git", "35e4d2931e1664383c9a085a90f846e58986c8c8", []},
|
||||
"ash_postgres": {:git, "https://github.com/ash-project/ash_postgres.git", "40c1a13652dc65406692ffbcaf6d78d1d8aa07c4", []},
|
||||
"assent": {:hex, :assent, "0.2.7", "aa68f68e577077c091ce722bff8fe1ae56b95b274bb8107f7a5406cc15a65da7", [:mix], [{:certifi, ">= 0.0.0", [hex: :certifi, repo: "hexpm", optional: true]}, {:finch, "~> 0.15", [hex: :finch, repo: "hexpm", optional: true]}, {:jose, "~> 1.8", [hex: :jose, repo: "hexpm", optional: true]}, {:mint, "~> 1.0", [hex: :mint, repo: "hexpm", optional: true]}, {:ssl_verify_fun, ">= 0.0.0", [hex: :ssl_verify_fun, repo: "hexpm", optional: true]}], "hexpm", "08106af439de4f9de114c0334de4c848de7cfbe53a5a52d342a784c4f6bc86f3"},
|
||||
|
|
Loading…
Reference in a new issue