UNPKG

redis-semaphore

Version:

Distributed mutex and semaphore based on Redis

8 lines (7 loc) 246 B
import Redis from 'ioredis'; export interface Options { identifier: string; lockTimeout: number; now: number; } export declare function releaseSemaphore(client: Redis, key: string, permits: number, identifier: string): Promise<void>;