Skip to content

Commit 4840108

Browse files
author
Ivan Duplenskikh
committed
Add a comment and parsing env variables
1 parent 2144746 commit 4840108

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

Tasks/CopyFilesOverSSHV0/copyfilesoverssh.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,8 @@ async function run() {
225225
}
226226
}
227227

228+
// If the contents were parsed into an array and the first element was set as default "**",
229+
// then upload the entire directory
228230
if (contents.length === 1 && contents[0] === "**") {
229231
tl.debug("Upload a directory to a remote machine");
230232

@@ -279,8 +281,8 @@ async function run() {
279281

280282
// Upload files to remote machine
281283
const q = new Queue({
282-
concurrent: 5,
283-
delay: 0,
284+
concurrent: process.env["CONCURRENT_UPLOADS"] ? parseInt(process.env["CONCURRENT_UPLOADS"]) : 5,
285+
delay: process.env["DELAY_BETWEEN_UPLOADS"] ? parseInt(process.env["DELAY_BETWEEN_UPLOADS"]) : 0,
284286
throwOnError: false
285287
});
286288

_generated/CopyFilesOverSSHV0/copyfilesoverssh.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,8 @@ async function run() {
225225
}
226226
}
227227

228+
// If the contents were parsed into an array and the first element was set as default "**",
229+
// then upload the entire directory
228230
if (contents.length === 1 && contents[0] === "**") {
229231
tl.debug("Upload a directory to a remote machine");
230232

@@ -279,8 +281,8 @@ async function run() {
279281

280282
// Upload files to remote machine
281283
const q = new Queue({
282-
concurrent: 5,
283-
delay: 0,
284+
concurrent: process.env["CONCURRENT_UPLOADS"] ? parseInt(process.env["CONCURRENT_UPLOADS"]) : 5,
285+
delay: process.env["DELAY_BETWEEN_UPLOADS"] ? parseInt(process.env["DELAY_BETWEEN_UPLOADS"]) : 0,
284286
throwOnError: false
285287
});
286288

_generated/CopyFilesOverSSHV0_Node20/copyfilesoverssh.ts

+4-2
Original file line numberDiff line numberDiff line change
@@ -225,6 +225,8 @@ async function run() {
225225
}
226226
}
227227

228+
// If the contents were parsed into an array and the first element was set as default "**",
229+
// then upload the entire directory
228230
if (contents.length === 1 && contents[0] === "**") {
229231
tl.debug("Upload a directory to a remote machine");
230232

@@ -279,8 +281,8 @@ async function run() {
279281

280282
// Upload files to remote machine
281283
const q = new Queue({
282-
concurrent: 5,
283-
delay: 0,
284+
concurrent: process.env["CONCURRENT_UPLOADS"] ? parseInt(process.env["CONCURRENT_UPLOADS"]) : 5,
285+
delay: process.env["DELAY_BETWEEN_UPLOADS"] ? parseInt(process.env["DELAY_BETWEEN_UPLOADS"]) : 0,
284286
throwOnError: false
285287
});
286288

0 commit comments

Comments
 (0)