mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-05 02:39:33 +02:00
Fix job panel sorting in administration
This commit is contained in:
parent
056aa7f2b4
commit
2c29ad4f3b
3 changed files with 35 additions and 9 deletions
|
@ -54,6 +54,18 @@ class Redis {
|
|||
return this.exists(this.buildViewKey(ip, videoUUID))
|
||||
}
|
||||
|
||||
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)
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
private getValue (key: string) {
|
||||
return new Promise<string>((res, rej) => {
|
||||
this.client.get(this.prefix + key, (err, value) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue