| Safe Haskell | None |
|---|---|
| Language | GHC2024 |
Arbiter.Core.Gates
Description
Internal to the arbiter packages. Not covered by the PVP.
Schema-scoped watermark gates for global tasks. One row per task holds last_run_at
and an optional metadata value.
runGated claims the row with SELECT ... FOR UPDATE SKIP LOCKED
once the interval has elapsed. At most one worker pool runs the task per interval.
Synopsis
Documentation
arbiterGatesTable :: SchemaName -> TextSource #
Qualified name of the gates table.
arbiterGatesTableName :: TextSource #
Bare name of the gates table, for catalog lookups by relname.
createGatesTableSQL :: SchemaName -> TextSource #
DDL for the arbiter_gates table.
addGateMetadataColumnSQL :: SchemaName -> TextSource #
Add the metadata column a task stores its result or resume state in.
The last_run_at of a gate that has not run.