Files
streamline/drizzle/0074_eddy_locks.sql
T
2026-11-16 17:26:44 -08:00

18 lines
618 B
SQL

-- Named leases for Eddy maintenance jobs that must run in one place at a time (the scheduled auto-release).
-- token_hash is the SHA-256 of the holder's secret token; NULL means free. Times are epoch milliseconds.
-- `status` is the holder's latest heartbeat progress; `last` the previous run (released with a result, or expired).
-- Additive: a new table only.
CREATE TABLE IF NOT EXISTS eddy_locks (
name text PRIMARY KEY,
token_hash text,
holder text,
info jsonb,
actor text,
acquired_at bigint,
heartbeat_at bigint,
expires_at bigint,
status jsonb,
last jsonb,
updated_at bigint NOT NULL
);