aboutsummaryrefslogtreecommitdiffhomepage
path: root/server/helpers/database-utils.ts
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2018-06-14 18:06:56 +0200
committerChocobozzz <me@florianbigard.com>2018-06-14 18:06:56 +0200
commit2baea0c77cc765f7cbca9c9a2f4272268892a35c (patch)
tree47b1be5535439409a97eb80c0222c9c821b83dae /server/helpers/database-utils.ts
parentbf079b7bfd7f0fb75ceb28e333bb4b74d8840dd4 (diff)
downloadPeerTube-2baea0c77cc765f7cbca9c9a2f4272268892a35c.tar.gz
PeerTube-2baea0c77cc765f7cbca9c9a2f4272268892a35c.tar.zst
PeerTube-2baea0c77cc765f7cbca9c9a2f4272268892a35c.zip
Add ability for uploaders to schedule video update
Diffstat (limited to 'server/helpers/database-utils.ts')
-rw-r--r--server/helpers/database-utils.ts6
1 files changed, 5 insertions, 1 deletions
diff --git a/server/helpers/database-utils.ts b/server/helpers/database-utils.ts
index 9b861a88c..ededa7901 100644
--- a/server/helpers/database-utils.ts
+++ b/server/helpers/database-utils.ts
@@ -22,11 +22,15 @@ function retryTransactionWrapper <T, A> (
22): Promise<T> 22): Promise<T>
23 23
24function retryTransactionWrapper <T> ( 24function retryTransactionWrapper <T> (
25 functionToRetry: () => Promise<T> | Bluebird<T>
26): Promise<T>
27
28function retryTransactionWrapper <T> (
25 functionToRetry: (...args: any[]) => Promise<T> | Bluebird<T>, 29 functionToRetry: (...args: any[]) => Promise<T> | Bluebird<T>,
26 ...args: any[] 30 ...args: any[]
27): Promise<T> { 31): Promise<T> {
28 return transactionRetryer<T>(callback => { 32 return transactionRetryer<T>(callback => {
29 functionToRetry.apply(this, args) 33 functionToRetry.apply(null, args)
30 .then((result: T) => callback(null, result)) 34 .then((result: T) => callback(null, result))
31 .catch(err => callback(err)) 35 .catch(err => callback(err))
32 }) 36 })