View Source OddJob.Registry (OddJob v0.5.1)
The OddJob
process registry.
Link to this section Summary
Functions
Returns the name in :via
that can be used to lookup an OddJob process.
Link to this section Types
Link to this section Functions
Specs
Returns the name in :via
that can be used to lookup an OddJob process.
The first argument is the atom that was used to name the pool
. The second
argument is the role
as an atom, or the tuple {:worker, id}
.
Roles
:queue
- thepool
process, aGenServer
that receives jobs and assigns them to the workers:pool_sup
- the supervisor responsible for starting and stopping the workers in the pool:proxy_sup
- the supervisor responsible for starting the proxy processes that link the calling process to the worker during execution of an async job:scheduler_sup
- the supervisor responsible for starting job scheduling processes
Example
iex> OddJob.Registry.via(ViaTest, :sup)
{:via, Registry, {OddJob.Registry, {ViaTest, :sup}}}
See OddJob.Utils
for helper functions that encapsulate each role.