View Source OddJob.Queue (OddJob v0.2.2)
The job queue that manages the assignments given to the pool workers.
Link to this section Summary
Link to this section Types
Specs
job() :: OddJob.Job.t()
Specs
t() :: %OddJob.Queue{ assigned: [pid()], id: atom(), jobs: [job()], supervisor: atom(), workers: [pid()] }
The OddJob.Queue
struct holds the state of the job queue.
:id
is an atom representing the registered name of the queue process:supervisor
is an atom representing the registered name of the queue's supervisor process:workers
is a list of the active workerpid
s, whether they are busy working or not:assigned
is a list of the workerpid
s that are currently assigned to a job:jobs
is a list ofOddJob.Job
structs representing the jobs that are queued to be performed when workers are available