Classes
The following classes are available globally.
-
Will retry the job every N seconds, scaling at a power of 2, until a max number of seconds is reached, at which point the queue will try to re-process the job at that max time interval.
MaxRetryStrategy is appropriate for situations wherein failure may decrease over time. A good example would be a Processor which is attempting to upload data to a server, but the server is down. We don’t want to continuously ping the server, rather we want to gradually back off more and more over time until the server is back online.
See moreDeclaration
Swift
open class BackoffRetryStrategy: JobRetryStrategy
-
A retry strategy that doesn’t actually retry anything. Rather, this strategy will simply stop the queue, halting all further progress, queue the job for immediate processing when the queue is started again.
See moreDeclaration
Swift
open class HaltRetryStrategy: JobRetryStrategy
-
A type-erased wrapper for a JobProcessor. Use this if you need to define an argument of a JobProcessor, or if you need to store a JobProcessor as a property.
Examples:
See morestruct MyJobType: QueueJob { ... } var persister: AnyJobProcessor<MyJobType> func someFunc(usingProcessor: AnyJobPersister<MyJobType>)
Declaration
Swift
open class AnyJobProcessor<HandlingJob: QueueJob>: JobProcessor
-
Will immediately retry the failed job until the maximum number of failure for that job is reached. Defaults to a max of 5 retries
See moreDeclaration
Swift
open class MaxRetryStrategy: JobRetryStrategy
-
A type-erased wrapper for a JobPersister. Use this if you need to define an argument of a JobPersister, or if you need to store a JobPersister as a property.
Examples:
See morestruct MyJobType: QueueJob { ... } var persister: AnyJobPersister<MyJobType> func someFunc(takingPersister: AnyJobPersister<MyJobType>)
Declaration
Swift
public class AnyJobPersister<HandlingJob: QueueJob>: JobPersister
-
A JobPersister which persists QueueJobs to the device’s local file system
See moreDeclaration
Swift
public class FileBasedPersister<HandlingJob: QueueJob>: JobPersister