Skip to content

Commit ad3d5a4

Browse files
committed
feat: add --poll-interval flag for retrieve
1 parent 699dd4b commit ad3d5a4

File tree

3 files changed

+13
-1
lines changed

3 files changed

+13
-1
lines changed

command-snapshot.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,7 @@
291291
"metadata",
292292
"output-dir",
293293
"package-name",
294+
"poll-interval",
294295
"single-package",
295296
"source-dir",
296297
"target-metadata-dir",

messages/retrieve.start.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -149,6 +149,10 @@ Extract all files from the retrieved zip file.
149149

150150
File name to use for the retrieved zip file.
151151

152+
# flags.poll-interval.summary
153+
154+
Number of seconds to wait between status checks.
155+
152156
# error.Conflicts
153157

154158
There are changes in your local files that conflict with the org changes you're trying to retrieve.

src/commands/project/retrieve/start.ts

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -152,6 +152,13 @@ export default class RetrieveMetadata extends SfCommand<RetrieveResultJson> {
152152
exclusive: ['ignore-conflicts'],
153153
helpGroup: mdapiFlagGroup,
154154
}),
155+
'poll-interval': Flags.duration({
156+
min: Duration.milliseconds(500).seconds,
157+
required: false,
158+
helpValue: '<seconds>',
159+
unit: 'seconds',
160+
summary: messages.getMessage('flags.poll-interval.summary'),
161+
}),
155162
};
156163

157164
public static configurationVariablesSection = toHelpSection(
@@ -266,7 +273,7 @@ export default class RetrieveMetadata extends SfCommand<RetrieveResultJson> {
266273
throw error;
267274
});
268275

269-
this.retrieveResult = await retrieve.pollStatus(500, flags.wait.seconds);
276+
this.retrieveResult = await retrieve.pollStatus(flags['poll-interval']?.milliseconds ?? 500, flags.wait.seconds);
270277
}
271278

272279
this.ms.stop();

0 commit comments

Comments
 (0)