MCPcopy Create free account
hub / github.com/Openpanel-dev/openpanel / getLock

Function getLock

packages/redis/redis.ts:128–131  ·  view source on GitHub ↗
(key: string, value: string, timeout: number)

Source from the content-addressed store, hash-verified

126}
127
128export async function getLock(key: string, value: string, timeout: number) {
129 const lock = await getRedisCache().set(key, value, 'PX', timeout, 'NX');
130 return lock === 'OK';
131}

Callers 1

isDuplicatedEventFunction · 0.90

Calls 2

getRedisCacheFunction · 0.85
setMethod · 0.45

Tested by

no test coverage detected