Skip to content

RelayClaimRequest — @gj-kit/nest-notifications

A public interface from @gj-kit/nest-notifications. The signature below is taken directly from the 0.1.1 release declaration.

import { RelayClaimRequest } from '@gj-kit/nest-notifications';
interface RelayClaimRequest {
readonly applicationKey: string;
readonly limit: number;
/**
* From the injected clock. Recorded verbatim on completion stamps and passed to
* the policy (R9). It is NOT the input to the staleness comparison - see
* `claimStaleMs`.
*/
readonly at: Date;
/**
* A duration, deliberately not an instant. The store decides staleness on its
* own clock (`claimedAt < now() - claimStaleMs`, R12): with N workers there are
* N process clocks, and the only clock they share is the store's.
*/
readonly claimStaleMs: number;
/**
* Skip rows already attempted this many times. Absent means no bound, which
* lets a permanently failing row occupy the due page forever (R13, design 7-16).
*
* The predicate is `attempts < maxAttempts` and nothing else: there is no
* cooldown column and no `retryAfter` field on this request or on
* {@link RelayReleaseRequest}, because retry timing has exactly one owner and
* it is the host's scheduler (design 0.4-7). A released row is therefore due
* again on the very next pass, so this bound is a pass count, not a duration.
*/
readonly maxAttempts?: number | undefined;
/** Opaque token this worker writes onto every row it wins. */
readonly claimToken: string;
}

This declaration is the source of truth for parameters, optionality, generics, return values, and public union/type contracts. Check the package golden path and this subpath’s import conditions for required environment, permission, and error boundaries before calling it.

  • Package: @gj-kit/nest-notifications
  • Version: 0.1.1
  • Public entry: .
  • Source: GitHub