Expand description
§Background Jobs Core
basic types and traits for implementing a background jobs processor
This crate shouldn’t be depended on directly, except in the case of implementing a custom jobs
processor. For a default solution based on Actix and Sled, look at the background-jobs crate.
Modules§
- memory_
storage - A default, in-memory implementation of a storage mechanism
Structs§
- BoxError
- A simple error box that provides no additional formatting utilities
- Cached
Processor Map - A type for storing the relationships between job names and the job itself, with the state pre-cached instead of being generated from the state function each time
- JobInfo
- Metadata pertaining to a job that exists within the background_jobs system
- Join
Error - The type produced when a task is dropped before completion as a result of being deliberately canceled, or it panicking
- NewJob
Info - Information about a newly created job
- Processor
Map - A type for storing the relationships between job names and the job itself
- Return
JobInfo - Information about the sate of an attempted job
Enums§
- Backoff
- Different styles for retrying jobs
- JobError
- The error type returned by the
processmethod - JobResult
- Indicate the state of a job after an attempted run
- MaxRetries
- How many times a job should be retried before giving up
- Should
Stop - A type that represents whether a job should be requeued
Traits§
- Job
- The Job trait defines parameters pertaining to an instance of background job
- Storage
- Define a storage backend for jobs
- Unsend
Job - The UnsendJob trait defines parameters pertaining to an instance of a background job
- Unsend
Spawner - The mechanism used to spawn Unsend futures, making them Send
Functions§
- new_job
- A provided method to create a new JobInfo from provided arguments
- new_
scheduled_ job - Create a NewJobInfo to schedule a job to be performed after a certain time
- process
- A provided method to coerce arguments into the expected type and run the job