Skip to content

Instantly share code, notes, and snippets.

View systra's full-sized avatar

Andrzej Trawiński systra

  • jTendo
  • Warsaw, Poland
View GitHub Profile
@uwiger
uwiger / Jobs_pools_and_passive_queues.erl
Created January 13, 2011 18:10
Example of how to configure Jobs with a worker pool, drawing from a regular (passive) queue
Fun = fun() ->
io:fwrite("~p starting...~n",[self()]),
Res = jobs:dequeue(q, 3),
io:fwrite("Res = ~p~n", [Res])
end,
application:set_env(jobs, queues,
[{pool, producer, Fun,
[{regulators, [
{counter,[{limit,3}]}
]}