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§

  • A default, in-memory implementation of a storage mechanism

Structs§

  • A simple error box that provides no additional formatting utilities
  • 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
  • Metadata pertaining to a job that exists within the background_jobs system
  • The type produced when a task is dropped before completion as a result of being deliberately canceled, or it panicking
  • Information about a newly created job
  • A type for storing the relationships between job names and the job itself
  • Information about the sate of an attempted job

Enums§

  • Different styles for retrying jobs
  • The error type returned by the process method
  • Indicate the state of a job after an attempted run
  • How many times a job should be retried before giving up
  • A type that represents whether a job should be requeued

Traits§

  • The Job trait defines parameters pertaining to an instance of background job
  • Define a storage backend for jobs
  • The UnsendJob trait defines parameters pertaining to an instance of a background job
  • The mechanism used to spawn Unsend futures, making them Send

Functions§

  • A provided method to create a new JobInfo from provided arguments
  • Create a NewJobInfo to schedule a job to be performed after a certain time
  • A provided method to coerce arguments into the expected type and run the job