Expand description
The database driver: a jobs table, a failed_jobs table, and a
reservation that is safe when several workers race for the same row.
Timestamps are stored as epoch seconds in bigint columns rather than as
timestamptz. rustlavel-db deliberately leaves a timestamp column as text so
precision survives, and a queue compares times far more often than it shows
them: an integer sorts, compares and indexes without anything having to
agree on a text format.
Structs§
- Create
Queue Tables - Database
Queue - A queue backed by two database tables.
Constants§
- FAILED_
JOBS_ TABLE - JOBS_
TABLE - The conventional table names, matching Laravel’s.
Functions§
- create_
tables - Create the queue’s two tables.
- define_
failed_ jobs_ table - The dead-letter table.
- define_
jobs_ table - The
jobstable. A free function rather than a closure so a test can build the statements without a database, and see the same schema production gets.