mirror of
https://github.com/Alfresco/alfresco-content-app.git
synced 2025-07-31 17:38:28 +00:00
add workaround needed in ADW due to REPO-4772 (#1353)
This commit is contained in:
@@ -75,7 +75,9 @@ export class Utils {
|
||||
static retryCall(fn: () => Promise<any>, retry: number = 30, delay: number = 1000): Promise<any> {
|
||||
const pause = duration => new Promise(res => setTimeout(res, duration));
|
||||
|
||||
const run = retries => fn().catch(err => (retries > 1 ? pause(delay).then(() => run(retries - 1)) : Promise.reject(err)));
|
||||
const run = retries => {
|
||||
return fn().catch(err => (retries > 1 ? pause(delay).then(() => run(retries - 1)) : Promise.reject(err)));
|
||||
}
|
||||
|
||||
return run(retry);
|
||||
}
|
||||
|
Reference in New Issue
Block a user