Update tzworld at runtime
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
@@ -14,10 +14,12 @@ defmodule Mobilizon do
|
||||
|
||||
import Cachex.Spec
|
||||
|
||||
alias Mix.Tasks.TzWorld.Update, as: TzWorldUpdate
|
||||
alias Mobilizon.{Config, Storage, Web}
|
||||
alias Mobilizon.Federation.ActivityPub
|
||||
alias Mobilizon.Service.{ErrorPage, ErrorReporting}
|
||||
alias Mobilizon.Service.Export.{Feed, ICalendar}
|
||||
alias TzWorld.Backend.DetsWithIndexCache
|
||||
|
||||
@name Mix.Project.config()[:name]
|
||||
@version Mix.Project.config()[:version]
|
||||
@@ -36,6 +38,10 @@ defmodule Mobilizon do
|
||||
@spec start(:normal | {:takeover, node} | {:failover, node}, term) ::
|
||||
{:ok, pid} | {:ok, pid, term} | {:error, term}
|
||||
def start(_type, _args) do
|
||||
# We update and reload TzWorld at runtime so that the data is not contained in releases
|
||||
TzWorldUpdate.run(nil)
|
||||
DetsWithIndexCache.handle_call(:reload_data, nil, nil)
|
||||
|
||||
children =
|
||||
[
|
||||
# supervisors
|
||||
|
||||
Reference in New Issue
Block a user