1
0
Fork 0
mirror of https://github.com/Chocobozzz/PeerTube.git synced 2025-10-06 03:50:26 +02:00

Migrate to bull

This commit is contained in:
Chocobozzz 2018-07-10 17:02:20 +02:00
parent 2cdf27bae6
commit 94831479f5
21 changed files with 221 additions and 163 deletions

View file

@ -78,16 +78,6 @@ class Redis {
return this.setObject(this.buildCachedRouteKey(req), cached, lifetime)
}
listJobs (jobsPrefix: string, state: string, mode: 'alpha', order: 'ASC' | 'DESC', offset: number, count: number) {
return new Promise<string[]>((res, rej) => {
this.client.sort(jobsPrefix + ':jobs:' + state, 'by', mode, order, 'LIMIT', offset.toString(), count.toString(), (err, values) => {
if (err) return rej(err)
return res(values)
})
})
}
generateResetPasswordKey (userId: number) {
return 'reset-password-' + userId
}