-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
27 changed files
with
160 additions
and
183 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
import Config | ||
|
||
config :logflare_ex, | ||
config :warehouse_ex, | ||
api_url: "https://api.logflare.app", | ||
api_key: "some-key", | ||
env: :test |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
import Config | ||
|
||
config :logflare_ex, | ||
config :warehouse_ex, | ||
env: :test, | ||
api_url: "https://localhost:4006" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,33 +1,33 @@ | ||
defmodule LogflareEx.Application do | ||
defmodule WarehouseEx.Application do | ||
@moduledoc false | ||
use Application | ||
|
||
@impl true | ||
def start(_type, _args) do | ||
env = Application.get_env(:logflare_ex, :env) | ||
env = Application.get_env(:warehouse_ex, :env) | ||
|
||
children = get_children(env) | ||
|
||
# See https://hexdocs.pm/elixir/Supervisor.html | ||
# for other strategies and supported options | ||
opts = [strategy: :one_for_one, name: LogflareEx.Supervisor] | ||
opts = [strategy: :one_for_one, name: WarehouseEx.Supervisor] | ||
Supervisor.start_link(children, opts) | ||
end | ||
|
||
defp get_children(:test) do | ||
[ | ||
LogflareEx.Repo, | ||
{Registry, keys: :unique, name: LogflareEx.BatcherRegistry}, | ||
{Finch, name: LogflareEx.Finch} | ||
WarehouseEx.Repo, | ||
{Registry, keys: :unique, name: WarehouseEx.BatcherRegistry}, | ||
{Finch, name: WarehouseEx.Finch} | ||
] | ||
end | ||
|
||
defp get_children(_) do | ||
[ | ||
LogflareEx.Repo, | ||
{DynamicSupervisor, name: LogflareEx.BatcherSup}, | ||
{Registry, keys: :unique, name: LogflareEx.BatcherRegistry}, | ||
{Finch, name: LogflareEx.Finch} | ||
WarehouseEx.Repo, | ||
{DynamicSupervisor, name: WarehouseEx.BatcherSup}, | ||
{Registry, keys: :unique, name: WarehouseEx.BatcherRegistry}, | ||
{Finch, name: WarehouseEx.Finch} | ||
] | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
defmodule LogflareEx.BatchedEvent do | ||
defmodule WarehouseEx.BatchedEvent do | ||
@moduledoc false | ||
use TypedEctoSchema | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.