Multiple worker modules for Poolboy configuration

Hello everyone, due to the lack of Elixir documentation about poolboy, I was wondering if the configuration allowed multiple worker modules to be included. Something like this:

defp poolboy_config do
    [
      name: {:local, :worker},
      # Several workers as worker module
      worker_module: [PoolboyApp.Worker1, PoolboyApp.UsersWorker ... ],
      size: 5,
      max_overflow: 2
    ]
  end

From the poolboy README:

worker_module : the module that represents the workers

That’s singular. You can only specify one per pool, as I read this.

2 Likes