GraphReFlyTS

API Reference

workQueueLeaseExpirationCommandProjector()

Lower only lease-expiration readiness candidates into existing workQueue expire-leases commands.

Import

import { workQueueLeaseExpirationCommandProjector } from "@graphrefly/ts/orchestration/work-queue";

Signature

function workQueueLeaseExpirationCommandProjector(
	graph: Graph,
	opts: {
		readonly name?: string;
		readonly candidates: Node<WorkQueueReadinessCandidate>;
	},
): WorkQueueLeaseExpirationCommandBundle<T>

Parameters

ParameterTypeDescription
graphGraphGraph that owns the created nodes or projector.
opts{ readonly name?: string; readonly candidates: Node<WorkQueueReadinessCandidate>; }Options that configure the helper.

Returns

A node bundle that emits the projected records.

Example

import { workQueueLeaseExpirationCommandProjector } from "@graphrefly/ts/orchestration/work-queue";

Source

packages/ts/src/orchestration/work-queue-scheduled-readiness.ts