Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

8 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

animus-queue-postgres

Durable Postgres queue plugin for Animus.

Version 0.2 adds the generation-fenced queue/v2/* contract used by the five-slot coding fleet:

  • idempotent enqueue with a monotonic generation per qualified subject;
  • exact repository/base/head-ref reservations;
  • Pending-only fresh leasing (expired assignments are never silently reused);
  • compare-and-swap lease renewal, expired-lease recovery, completion, and return-to-pending;
  • stable workflow and subject identity across daemon restart/recovery;
  • stale-owner fencing after every lease transfer.

Legacy queue/* methods remain available for older daemons. They cannot lease or mutate v2 entries, so mixed-version deployment fails closed instead of creating a second workflow or node.

Configuration

  • DATABASE_URL or ANIMUS_POSTGRES_URL: Postgres connection URL.
  • ANIMUS_QUEUE_LEASE_TTL_SECS: maximum lease TTL (default 1800 seconds).
  • ANIMUS_QUEUE_TABLE: safe table identifier (default queue_item).

The plugin applies additive, idempotent schema changes. Its health check is not ready until both Postgres and the complete v2 schema are available.

Verification

cargo test --all-targets
cargo clippy --all-targets --all-features -- -D warnings

Postgres integration tests use TEST_DATABASE_URL, falling back to postgres://postgres:postgres@localhost:55432/animus_test.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Contributors

Languages