method IDistributedLock.release
IDistributedLock.release(
key: string,
token: string
): Promise<void>

Release a previously acquired lock.

Only releases if the provided token matches the held token.

Parameters

key: string

The lock key

token: string

The token returned by acquire

Return Type

Promise<void>

Usage

import { type IDistributedLock } from "scheduler-plugin/src/index.ts";