You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently core contains some functions that should not be there:
src/redis.ts - checkRedis
This function should be refactored into something like
typecooldownCheckResult={canUse: true}|{canUse: false,canUseAt: number};asyncfunctioncheckCommandCooldown(key: string,cooldown: number,userId: string): Promise<cooldownCheckResult>{// If key doesnt exist, set the key+ttl, return { canUse: true }// If the key does exist, return { canUse: false, canUseAt: ... }}
This function should also be moved to handler, as it is only used for commands.
src/redis.ts - setExpireCommand
This function can probably removed, and we can simply set the TTL, or override it.
If it is necessary to not reset the ttl, we can change this to setexNoReset or something similar, and the logging can be removed.
This can be kept in core without the logging (or changed logging to be more generic).
src/redis.ts - handleExpiration
This function should be named instead like handlerComponentExpiry, and should be moved to handler, as it will be only used there.
The text was updated successfully, but these errors were encountered:
Currently
core
contains some functions that should not be there:src/redis.ts - checkRedis
This function should be refactored into something like
This function should also be moved to handler, as it is only used for commands.
src/redis.ts - setExpireCommand
This function can probably removed, and we can simply set the TTL, or override it.
If it is necessary to not reset the ttl, we can change this to
setexNoReset
or something similar, and the logging can be removed.This can be kept in core without the logging (or changed logging to be more generic).
src/redis.ts - handleExpiration
This function should be named instead like
handlerComponentExpiry
, and should be moved to handler, as it will be only used there.The text was updated successfully, but these errors were encountered: