Open marceln opened 2 weeks ago
@marceln do you have mongo_client
compiled and available for the app?
Yes, it's a simple module lying next to the supervisor file:
-module(mongo_client).
-behaviour(ecpool_worker).
-export([connect/1]).
connect(Opts) ->
erlang:display(Opts),
Type = proplists:get_value(type, Opts, single),
Urls = proplists:get_value(hosts, Opts, "localhost:27017"),
Options = proplists:get_value(options, Opts, [{max_overflow, 0}]),
WorkerOptions = proplists:get_value(worker_options, Opts, []),
mongo_api:connect(Type, Urls, Options, WorkerOptions).
I guess the erlang:display did not print anything for you ? maybe check if the module (beam) is actually loaded.
I'm having issues setting up a basic pool. I'm using this code in my supervisor initialization:
However, I keep getting this
undef
error and I can't figure out what's the source of it. Do you have any hints?