Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Reference

Use this section when you already know the concept you need and want exact package, feature, API, compatibility, or troubleshooting details.

The guide pages explain how to build common workflows. The reference pages are for looking up the supported surface area and checking which crate, feature flag, or documentation source applies to your use case.

docs.rs and this guide

The generated Rust API documentation is published on docs.rs. Use docs.rs when you need item-level details for public Rust types, traits, builders, and re-exports from the graphile_worker crate.

Use this mdBook guide when you need operational or architectural context:

For example, look up the exact methods and trait bounds on docs.rs, then return to the guide for the surrounding setup:

use graphile_worker::{TaskHandler, WorkerOptions};

// Check docs.rs for the exact public API of each type.
// Check the guide for configuration examples and operational context.

Public crate surface

The top-level graphile_worker crate re-exports the main types used by applications:

  • Worker for running workers.
  • WorkerOptions, CronInput, and WorkerBuildError for configuration.
  • WorkerUtils for job management helpers.
  • TaskHandler and related task handling types.
  • Job and job specification types from the job crates.
  • Context, database, lifecycle hook, shutdown signal, and cron types.
  • LocalQueue and its configuration and error types.
  • Worker recovery types such as WorkerRecoveryConfig and SweepStaleWorkersOptions.

The workspace also contains smaller crates for specific responsibilities. See Crate Map when you need to know which package owns a type or feature area.

Feature flags

The default graphile_worker feature set enables:

default = ["runtime-tokio", "tls-rustls", "driver-sqlx"]

The visible feature groups are:

  • Runtime: runtime-tokio, runtime-async-std.
  • TLS: tls-rustls, tls-native-tls.
  • Database driver: driver-sqlx, driver-tokio-postgres.
  • OpenTelemetry compatibility: opentelemetry_0_30, opentelemetry_0_31, opentelemetry_0_32.

Start with the defaults unless you have a specific runtime, TLS, database driver, or OpenTelemetry version requirement. See Feature Flags and Runtime, TLS, and Drivers before changing them.

Compatibility checklist

Before changing a dependency or feature set, check the compatibility page for the constraints that matter across the workspace:

  • Runtime feature enabled.
  • Database driver feature enabled.
  • TLS backend enabled.
  • OpenTelemetry compatibility feature matching your tracing stack.

See Compatibility for the reference checklist.

Troubleshooting entry points

For setup or runtime issues, start with the page closest to the symptom:

When the issue is about a specific Rust type or trait, use the API Reference page as the bridge to docs.rs.