Add compiler warning for preloader impl

pull/974/head
connor rigby 2019-05-07 08:12:11 -07:00 committed by Connor Rigby
parent dd05ffc40e
commit b968827d4b
No known key found for this signature in database
GPG Key ID: 29A88B24B70456E0
1 changed files with 9 additions and 0 deletions

View File

@ -5,6 +5,15 @@ defmodule FarmbotExt.API.Preloader do
* FarmbotCore.Asset.FbosConfig
* FarmbotCore.Asset.FirmwareConfig
"""
Application.get_env(:farmbot_ext, __MODULE__)[:preloader_impl] ||
Mix.raise("""
No default preloader implementation was provided.
config :farmbot_ext, FarmbotExt.API.Preloader, [
preloader_impl: FarmbotExt.API.Preloader.HTTP
]
""")
@callback preload_all :: :ok | :error
def preload_all do