feat(growth): load data on application start
To make this possible, the following changes were made: * Use `Task` to start the load process * Create `ets` table before start the async task * This is needed to keep the tables alive after the task process exits * Adjust the application to start the `Growth.Indicators.Load` task
This commit is contained in:
@@ -16,9 +16,10 @@ defmodule Wabanex.Application do
|
||||
# Start the PubSub system
|
||||
{Phoenix.PubSub, name: Wabanex.PubSub},
|
||||
# Start the Endpoint (http/https)
|
||||
WabanexWeb.Endpoint
|
||||
WabanexWeb.Endpoint,
|
||||
# Start a worker by calling: Wabanex.Worker.start_link(arg)
|
||||
# {Wabanex.Worker, arg}
|
||||
{Growth.Indicators.Load, []}
|
||||
]
|
||||
|
||||
# See https://hexdocs.pm/elixir/Supervisor.html
|
||||
|
Reference in New Issue
Block a user