Mid-level Track Roadmap

Solid Queue: job architecture

This course reads the solid_queue 1.3.2 code that moves rows between its eleven tables, and the SQL each move produces. It covers the enqueue transaction and the worker claim with FOR UPDATE SKIP LOCKED and two poll indexes. It also covers concurrency limits as semaphore and blocked rows, plus scheduled, failed and retried jobs. Later lessons cover process heartbeats, orphaned claims, recurring tasks, pauses, and the connection pool check that can stop the supervisor at boot. The last lesson traces one job through every table.

What you'll learn

  • ✓The enqueue transaction and why execution rows repeat job columns
  • ✓Claiming jobs with FOR UPDATE SKIP LOCKED and the two poll indexes
  • ✓Concurrency limits as semaphore rows and blocked execution rows
  • ✓Scheduled, failed and retried jobs, and cleanup of finished rows
  • ✓Process registration, heartbeats and what happens to orphaned claims
  • ✓Recurring tasks, queue pauses and the connection pool validation at boot
Free preview · Lesson 1 5 min read

Enqueue is one transaction, two tables

The junior course "Solid Queue: background jobs" listed this app's eleven solid_queue_* tables and read config/queue.yml line by line. It stopped at the names. This course reads the code that moves rows between those tables, using solid_queue 1.3.2. It captures the SQL each move produces against…

Read the full lesson free →

Curriculum

7 lessons
Type to start searching...