mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-10-04 18:29:27 +02:00
Move to promises
Closes https://github.com/Chocobozzz/PeerTube/issues/74
This commit is contained in:
parent
5fe7e89831
commit
6fcd19ba73
88 changed files with 1980 additions and 2505 deletions
12
server/models/request/abstract-request-interface.ts
Normal file
12
server/models/request/abstract-request-interface.ts
Normal file
|
@ -0,0 +1,12 @@
|
|||
import * as Promise from 'bluebird'
|
||||
|
||||
export interface AbstractRequestClass <T> {
|
||||
countTotalRequests: () => Promise<number>
|
||||
listWithLimitAndRandom: (limitPods: number, limitRequestsPerPod: number) => Promise<T>
|
||||
removeWithEmptyTo: () => Promise<number>
|
||||
removeAll: () => Promise<void>
|
||||
}
|
||||
|
||||
export interface AbstractRequestToPodClass {
|
||||
removeByRequestIdsAndPod: (ids: number[], podId: number) => Promise<number>
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue