Framework
Queues
Queues is a pure Swift queuing system that allows you to offload task responsibility to a side worker.
Overview
Some of the tasks this package works well for:
Sending emails outside of the main request thread
Performing complex or long-running database operations
Ensuring job integrity and resilience
Speeding up response time by delaying non-critical processing
Scheduling jobs to occur at a specific time
Topics
Classes
class QueuesCommandThe command to start the Queue jobclass ScheduleBuilderAn object that can be used to build a scheduled job
Protocols
protocol AnyJobA type-erased version ofJob.protocol AsyncJobA task that can be queued for future execution.protocol AsyncJobEventDelegateRepresents an object that can receive notifications about job statusesprotocol AsyncQueueprotocol AsyncScheduledJobDescribes a job that can be scheduled and repeatedprotocol JobA task that can be queued for future execution.protocol JobEventDelegateRepresents an object that can receive notifications about job statusesprotocol QueueA type that can store and retrieve jobs from a persistence layerprotocol QueuesDriverA new driver for Queuesprotocol ScheduledJobDescribes a job that can be scheduled and repeated
Structures
struct JobDataHolds information about the Job that is to be encoded to the persistence store.struct JobEventDataData on a job sent via a notificationstruct JobIdentifierAn identifier for a jobstruct QueueContextThe context for a queue.struct QueueNameA specific queue that jobs are run on.struct QueueWorkerThe worker that runsJobs.struct QueuesConfigurationConfiguration parameters for the Queues module as a whole.
Enumerations
enum QueuesEventLoopPreferenceDetermines which event loop the jobs worker uses while executing jobs.