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:
parent
2cdf27bae6
commit
94831479f5
21 changed files with 221 additions and 163 deletions
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue