Add ability for uploaders to schedule video update
This commit is contained in:
parent
bf079b7bfd
commit
2baea0c77c
21 changed files with 469 additions and 22 deletions
|
@ -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))
|
||||
})
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue