mirror of
https://github.com/Chocobozzz/PeerTube.git
synced 2025-02-25 18:55:32 -06:00
Add ability for uploaders to schedule video update
This commit is contained in:
@@ -21,12 +21,16 @@ function retryTransactionWrapper <T, A> (
|
||||
arg1: A
|
||||
): Promise<T>
|
||||
|
||||
function retryTransactionWrapper <T> (
|
||||
functionToRetry: () => Promise<T> | Bluebird<T>
|
||||
): Promise<T>
|
||||
|
||||
function retryTransactionWrapper <T> (
|
||||
functionToRetry: (...args: any[]) => Promise<T> | Bluebird<T>,
|
||||
...args: any[]
|
||||
): Promise<T> {
|
||||
return transactionRetryer<T>(callback => {
|
||||
functionToRetry.apply(this, args)
|
||||
functionToRetry.apply(null, args)
|
||||
.then((result: T) => callback(null, result))
|
||||
.catch(err => callback(err))
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user