Conduit.Unique
Functions
Check whether a unique constraint is active (not expired) for the given fingerprint. Returns true if a conflicting active job exists.
fnfingerprintfingerprint(job_type : String, queue : String, payload : String, fields : List(String), scope) : String#
Compute a unique fingerprint for a job.
Scope controls the uniqueness boundary:
- `PerQueue` (default): fingerprint includes the queue name, so the same job
type+payload is unique per queue but can be enqueued in different queues.
- `Global`: fingerprint excludes the queue, so only one active job with this
type+payload may exist across all queues.
The fingerprint is: SHA-256 hex of (prefix ++ ":" ++ field1=val1 ++ "," ++ ...).
If `fields` is empty, the entire payload is included.Release a unique constraint for a job (set unique_key = NULL). Called when the job completes, is discarded, or dead-lettered.