@profitlich/template-toolkit 2.9.4 → 2.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/scripts/deploy.js +15 -2
package/package.json
CHANGED
package/scripts/deploy.js
CHANGED
|
@@ -135,12 +135,25 @@ export async function runDeploy(mode, uploadTasks, options = {}) {
|
|
|
135
135
|
);
|
|
136
136
|
|
|
137
137
|
const queue = [...filesToUpload];
|
|
138
|
-
await Promise.all(workers.map(async (
|
|
138
|
+
await Promise.all(workers.map(async (initialWorkerClient) => {
|
|
139
|
+
let workerClient = initialWorkerClient;
|
|
139
140
|
try {
|
|
140
141
|
while (true) {
|
|
141
142
|
const item = queue.shift();
|
|
142
143
|
if (!item) break;
|
|
143
|
-
|
|
144
|
+
let retries = 0;
|
|
145
|
+
while (true) {
|
|
146
|
+
try {
|
|
147
|
+
await workerClient.uploadFrom(item.file, item.remotePath);
|
|
148
|
+
break;
|
|
149
|
+
} catch (err) {
|
|
150
|
+
retries++;
|
|
151
|
+
workerClient.close();
|
|
152
|
+
if (retries >= 3) throw err;
|
|
153
|
+
await delay(1000 * retries);
|
|
154
|
+
workerClient = await createClient(accessOptions);
|
|
155
|
+
}
|
|
156
|
+
}
|
|
144
157
|
progressBar.increment();
|
|
145
158
|
}
|
|
146
159
|
} finally {
|