diff options
| author | Ted Ross <tross@apache.org> | 2009-11-10 15:21:20 +0000 |
|---|---|---|
| committer | Ted Ross <tross@apache.org> | 2009-11-10 15:21:20 +0000 |
| commit | bd53c1d4c4fc6781bbe612d8de3b9e3874ef5f64 (patch) | |
| tree | 1ca7184e360ef1c37075ce6e9b4f73dcbf2df9ff /qpid/python/commands | |
| parent | 8e7a54b2ab7ece9abb12f801ace64a9007e51671 (diff) | |
| download | qpid-python-bd53c1d4c4fc6781bbe612d8de3b9e3874ef5f64.tar.gz | |
Added calls to flush() for stdout to make this program more responsive in cases where output
buffering may occur (i.e. piping to a file and tailing the file).
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk@834496 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'qpid/python/commands')
| -rwxr-xr-x | qpid/python/commands/qpid-queue-stats | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/qpid/python/commands/qpid-queue-stats b/qpid/python/commands/qpid-queue-stats index 356a1d2d8d..3b8a0dcb19 100755 --- a/qpid/python/commands/qpid-queue-stats +++ b/qpid/python/commands/qpid-queue-stats @@ -79,7 +79,7 @@ class BrokerManager(Console): if len(self.filter) > 0 : match = False - + for x in self.filter: if x.match(name): match = True @@ -103,12 +103,14 @@ class BrokerManager(Console): (deltaTime / 1000000000.0) print "%-41s%10.2f%11d%13.2f%13.2f" % \ (name, deltaTime / 1000000000, record.msgDepth, enqueueRate, dequeueRate) + sys.stdout.flush() def Display (self): self.session.bindClass("org.apache.qpid.broker", "queue") print "Queue Name Sec Depth Enq Rate Deq Rate" print "========================================================================================" + sys.stdout.flush() try: while True: sleep (1) |
