48ea805999 (commitcomment-48584326)
This commit is contained in:
syuilo 2021-03-23 14:54:09 +09:00
parent 48ea805999
commit 5c3a56b283
10 changed files with 42 additions and 39 deletions

View file

@ -1,4 +1,4 @@
import redis from '../db/redis';
import { redisClient } from '../db/redis';
import { promisify } from 'util';
/**
@ -7,8 +7,8 @@ import { promisify } from 'util';
const retryDelay = 100;
const lock: (key: string, timeout?: number) => Promise<() => void>
= redis
? promisify(require('redis-lock')(redis, retryDelay))
= redisClient
? promisify(require('redis-lock')(redisClient, retryDelay))
: async () => () => { };
/**