Que v0.8.0 Que.Persistence behaviour
Provides a high-level API to interact with Jobs in Database
This module is a behaviour that delegates calls to the specified
adapter. It has been designed in a way that it’s easy to write
custom adapters for other databases or stores like Redis, even
though there are no current plans on supporting anything other
than Mnesia.
Summary
Callbacks
Returns all Que.Jobs for the given worker
Returns completed Que.Jobs from the database
Returns completed Que.Jobs for the given worker
Deletes a Que.Job from the database
Returns failed Que.Jobs for the given worker
Returns incomplete Que.Jobs from the database
Returns incomplete Que.Jobs for the given worker
Makes sure that the Database is ready to be used
Inserts a Que.Job into the database
Updates an existing Que.Job in the database
Functions
Callbacks
Returns all Que.Jobs for the given worker.
Returns completed Que.Jobs for the given worker.
Deletes a Que.Job from the database.
Returns failed Que.Jobs for the given worker.
Finds a Que.Job from the database.
Returns the a Job struct if it’s found, otherwise nil.
Returns incomplete Que.Jobs from the database.
This includes all Jobs whose status is either
:queued or :started but not :failed.
Returns incomplete Que.Jobs for the given worker.
Makes sure that the Database is ready to be used.
This is called when the Que application, specifically
Que.Server, starts to make sure that a database exists
and is ready to be used.
Inserts a Que.Job into the database.
Returns the same Job struct with the id value set
Updates an existing Que.Job in the database.
This methods finds the job to update by the given job’s id. If no job with the given id exists, it is inserted as-is. If the id of the given job is nil, it’s still inserted and a valid id is assigned.
Returns the updated job.