swarthy/redis-semaphore

View on GitHub
src/utils/redlock.ts

Summary

Maintainability
A
0 mins
Test Coverage
export function getQuorum(clientCount: number) {
  return Math.round((clientCount + 1) / 2)
}

export function smartSum(count: number, zeroOrOne: number) {
  return count + zeroOrOne
}