Skip to content

Commit c50f4c3

Browse files
feat: add concurrent to the task of copying hedera jar files to network node (#1289)
Signed-off-by: Jeffrey Tang <[email protected]>
1 parent bbfc1c6 commit c50f4c3

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

src/commands/node/tasks.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ import {
1616
FREEZE_ADMIN_ACCOUNT,
1717
HEDERA_NODE_DEFAULT_STAKE_AMOUNT,
1818
IGNORED_NODE_ACCOUNT_ID,
19+
NODE_COPY_CONCURRENT,
1920
TREASURY_ACCOUNT_ID,
2021
} from '../../core/constants.js';
2122
import {Templates} from '../../core/templates.js';
@@ -254,7 +255,7 @@ export class NodeCommandTasks {
254255
}
255256
// set up the sub-tasks
256257
return task.newListr(subTasks, {
257-
concurrent: true,
258+
concurrent: constants.NODE_COPY_CONCURRENT,
258259
rendererOptions: constants.LISTR_DEFAULT_RENDERER_OPTION,
259260
});
260261
}

src/core/constants.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export const SOLO_REMOTE_CONFIGMAP_NAME = 'solo-remote-config';
2626
export const SOLO_REMOTE_CONFIGMAP_LABELS = {'solo.hedera.com/type': 'remote-config'};
2727
export const SOLO_REMOTE_CONFIG_MAX_COMMAND_IN_HISTORY = 50;
2828
export const SOLO_REMOTE_CONFIGMAP_LABEL_SELECTOR = 'solo.hedera.com/type=remote-config';
29-
29+
export const NODE_COPY_CONCURRENT = Number(process.env.NODE_COPY_CONCURRENT) || 4;
3030
// --------------- Hedera network and node related constants --------------------------------------------------------------------
3131
export const HEDERA_CHAIN_ID = process.env.SOLO_CHAIN_ID || '298';
3232
export const HEDERA_HGCAPP_DIR = '/opt/hgcapp';

0 commit comments

Comments
 (0)