Skip to content

Commit

Permalink
SB uplaod not in parallel
Browse files Browse the repository at this point in the history
  • Loading branch information
yevheniyJ committed Jan 23, 2024
1 parent ea8e44a commit 2bdc113
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions src/plugin/tree/files/filesTreeItem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,11 +105,18 @@ export class FilesTreeItem extends vscode.TreeItem {
updateStrings: this.file?.updateStrings,
});
} else {
let promises: Promise<void>[] = [];
for (const item of arr) {
promises.push(item.save());
// for SB we can not upload files in parallel due to concurrency issues
if (this.client.stringsBased) {
for (const item of arr) {
await item.save();
}
} else {
let promises: Promise<void>[] = [];
for (const item of arr) {
promises.push(item.save());
}
return Promise.all(promises);
}
return Promise.all(promises);
}
}

Expand Down

0 comments on commit 2bdc113

Please sign in to comment.