Class: Schked::Adapters
- Inherits:
-
Object
- Object
- Schked::Adapters
- Defined in:
- lib/schked/adapters/sequel.rb,
lib/schked/adapters/active_record.rb
Overview
Adapter for ActiveRecord connection pools (PostgreSQL, Mysql2,
Trilogy). Implements the Schked::JobRunStore contract.
The adapter wraps a connection pool, not a single connection: every
operation checks a connection out via with_connection and returns it
afterwards. The lease guarantees exclusive use of the checked-out
connection, so claims (scheduler thread) and the cleanup sweep (work
threads) can safely share the pool, and the pool transparently
replaces dead connections after a database restart or failover.
Defined Under Namespace
Classes: ActiveRecord, Sequel