This is an automated email from the ASF dual-hosted git repository.
clebertsuconic pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/activemq-artemis.git
The following commit(s) were added to refs/heads/main by this push:
new e78136b429 ARTEMIS-4743 Renaming --loop-sleep as just --sleep
e78136b429 is described below
commit e78136b4294dc61989fe33385f7626535c36c529
Author: Clebert Suconic <[email protected]>
AuthorDate: Fri May 10 11:11:21 2024 -0400
ARTEMIS-4743 Renaming --loop-sleep as just --sleep
Notice that I'm keeping the old argument here as hidden
As I keep using this myself, my brain always go to ./artemis queue stat
--sleep
So, I think people would feel more comfortable if the parameter was renamed.
---
.../apache/activemq/artemis/cli/commands/queue/StatQueue.java | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git
a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/queue/StatQueue.java
b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/queue/StatQueue.java
index 694e558503..484a9e9ed0 100644
---
a/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/queue/StatQueue.java
+++
b/artemis-cli/src/main/java/org/apache/activemq/artemis/cli/commands/queue/StatQueue.java
@@ -106,7 +106,10 @@ public class StatQueue extends ConnectionAbstract {
private boolean useLoop = false;
private static final long DEFAULT_SLEEP = 60_000;
- @Option(names = "--loop-sleep", description = "Amount of Milliseconds to
sleep before each iteration on queue stat. Default=60000")
+ @Option(names = "--loop-sleep", description = "Amount of Milliseconds to
sleep before each iteration on queue stat. Default=60000", hidden = true)
+ private long oldSleep = -1;
+
+ @Option(names = "--sleep", description = "Amount of Milliseconds to sleep
before each iteration on queue stat. Default=60000")
private long loopSleep = -1;
@Option(names = "--single-line-header", description = "Use a single line on
the header titles")
@@ -186,6 +189,11 @@ public class StatQueue extends ConnectionAbstract {
singleExeuction(context, filter);
+ // if using the hidden parameter
+ if (oldSleep != -1) {
+ loopSleep = oldSleep;
+ }
+
if (loopSleep != -1) {
// if --loop-sleep was passed as an argument, it is assumed the user
also meant --loop
useLoop = true;