A Queue system built in Erlang.
Add Queuerl to your deps:
{deps, [
{queuerl, {git, "https://github.com/minostro/queuerl.git", {branch, "master"}}}
]}.
After you have fetched the dependency, you have to add queuerl_sup
to your application root supervisor:
init([]) ->
Queuerl = {
queuerl_sup,
{queuerl_sup, start_link, []},
permanent,
5000,
supervisor,
[]},
{ok, {{one_for_one, 10, 20}, [Queuerl, ...]} }.
Once your application is up and running, queuerl_sup
will automatically spawn the queue subsystem. You can enqueue a Task
as follows:
Task = queuerl:new_task(fun() -> erlang:display(hello) end),
queuerl:enqueue(Task),
flush(),
Shell got {succeeded,{<<32,80,218,144,238,8,17,229,141,104,164,94,96,232,145,185>>}}
$ rebar3 compile