简体   繁体   中英

Que failing with Distillery release and Docker

I have setup a Docker environment with Distillery to generate a release of my application.

My Application uses Que to add a worker like so

case Que.add(SyncWorker, %{}) do
      {:ok, _job} -> {:ok, "Syncing..."}
      err -> {:error, "Error syncing: #{err}"}
end

However when this line is called I get:

** (exit) exited in: GenServer.call({:global, {Que.Server, SolarisCards.ShopifyIntegration.Workers.SyncWorker}}, {:add_job, SolarisCards.ShopifyIntegration.Workers.SyncWorker, %{}}, 5000)
    ** (EXIT) an exception was raised:
        ** (UndefinedFunctionError) function ExUtils.Module.name/1 is undefined (module ExUtils.Module is not available)
            ExUtils.Module.name(SolarisCards.ShopifyIntegration.Workers.SyncWorker)
            (que) lib/que/server.ex:81: Que.Server.handle_call/3
            (stdlib) gen_server.erl:661: :gen_server.try_handle_call/4
            (stdlib) gen_server.erl:690: :gen_server.handle_msg/6
            (stdlib) proc_lib.erl:249: :proc_lib.init_p_do_apply/3
    (elixir) lib/gen_server.ex:989: GenServer.call/3
    (solaris_cards) lib/solaris_cards/setup.ex:12: SolarisCards.Setup.do_setup_data/0

It works fine locally without docker and distillery, but not sure why its fails above.

I have also tried to run the command for precompiled application as described in the docs with no luck.

iex(my_app@127.0.0.1)1> Que.Persistence.Mnesia.setup!

{:ex_utils, "~> 0.1.7"}mix.exs依赖项就可以了。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM