mirror of
https://github.com/overleaf/overleaf.git
synced 2024-11-07 20:31:06 -05:00
Fix small mistakes
This commit is contained in:
parent
535e489ae5
commit
03b541fb64
1 changed files with 1 additions and 2 deletions
|
@ -8,14 +8,13 @@ module.exports = RateLimiter =
|
|||
_buildKey: (endpoint, subject) ->
|
||||
return "RateLimiter:#{endpoint}:{#{subject}}"
|
||||
|
||||
addCount: (opts, callback = (opts, shouldProcess)->)->
|
||||
addCount: (opts, callback = (err, shouldProcess)->)->
|
||||
k = RateLimiter._buildKey(opts.endpointName, opts.subjectName)
|
||||
multi = rclient.multi()
|
||||
multi.incr(k)
|
||||
multi.get(k)
|
||||
multi.expire(k, opts.timeInterval)
|
||||
multi.exec (err, results)->
|
||||
console.log ">> results", results
|
||||
count = results[1]
|
||||
# account for the different results from `multi` when using cluster
|
||||
if count instanceof Object
|
||||
|
|
Loading…
Reference in a new issue