Fixes url redirection error for executebatch

This commit is contained in:
Akshay Nair
2020-10-16 00:53:47 +05:30
parent 3bc0dd526f
commit 5a363ce92f
+1 -1
View File
@@ -66,7 +66,7 @@ const executeBatch = (batches) => batches.reduce((promise, batch, index) => {
const values = await Promise.all(batch.map(fn => fn().catch(e => console.error(e))));
const results = values.map(R.pathOr({}, ['cpanelresult', 'data', 0]));
const results = values.map(data => R.pathOr({ result: data }, ['cpanelresult', 'data', 0], data));
const failed = results.filter(x => (x.result || {}).status != 1);
log(`${values.length - failed.length}/${values.length}`);