Queue
class. Out of the box, Alchemy provides providers for queues backed by Redis and SQL as well as an in-memory mock queue.
Service
protocol. Configure it with the config
function.
database()
queue configuration, you’ll need to add the Queue.AddJobsMigration
migration to your database’s migrations.
Job
protocol. It includes a single run
function. It also requires Codable
conformance, so that any properties will be serialized and available when the job is run.
Model
s are Codable and can thus be included and persisted as properties of a job.
dispatch()
.
finished
function to hook into the result of a completed job.
queue
command.
--workers
flag when starting your server have it run the given amount of workers in process.
queues
command in Configuration.
dispatch()
.
"default"
channel, but you can tell them dequeue from another channel with the -c option.
recoveryStrategy
property. This indicates what should happen when a job is failed.
retryBackoff
to wait the specified time amount before retrying a job.