Login
[x]
Log in using an account from:
Fedora Account System
Red Hat Associate
Red Hat Customer
Or login using a Red Hat Bugzilla account
Forgot Password
Login:
Hide Forgot
Create an Account
Red Hat Bugzilla – Attachment 649278 Details for
Bug 878940
spout/drain examples fixes and improvements
[?]
New
Simple Search
Advanced Search
My Links
Browse
Requests
Reports
Current State
Search
Tabular reports
Graphical reports
Duplicates
Other Reports
User Changes
Plotly Reports
Bug Status
Bug Severity
Non-Defaults
|
Product Dashboard
Help
Page Help!
Bug Writing Guidelines
What's new
Browser Support Policy
5.0.4.rh83 Release notes
FAQ
Guides index
User guide
Web Services
Contact
Legal
This site requires JavaScript to be enabled to function correctly, please enable it.
[patch]
patch for drain.pl
drain.pl_patch (text/plain), 1.55 KB, created by
Petr Matousek
on 2012-11-21 15:32:49 UTC
(
hide
)
Description:
patch for drain.pl
Filename:
MIME Type:
Creator:
Petr Matousek
Created:
2012-11-21 15:32:49 UTC
Size:
1.55 KB
patch
obsolete
>--- drain.pl 2012-11-21 15:23:43.236359816 +0100 >+++ drainV2.pl 2012-11-21 15:34:12.566406828 +0100 >@@ -24,9 +24,9 @@ > use Getopt::Long; > > my $url = "127.0.0.1"; >-my $timeout = 60; >+my $timeout = 0; > my $forever = 0; >-my $count = 1; >+my $count = 0; > my $connectionOptions = ""; > my $address = "amq.direct"; > >@@ -36,11 +36,8 @@ > "forever|f" => \ $forever, > "connection-options=s" => \ $connectionOptions, > "count|c=i" => \ $count, >-); >- >-if (! $result) { >- print "Usage: perl drain.pl [OPTIONS]\n"; >-} >+ "help|h" => \ &usage >+) or usage(); > > if ($#ARGV ge 0) { > $address = $ARGV[0] >@@ -50,6 +47,15 @@ > return ($forever) ? $cqpid_perl::Duration::FOREVER : new cqpid_perl::Duration($timeout*1000); > } > >+sub usage { >+ print "Usage: perl drain.pl [OPTIONS]\n"; >+ exit; >+} >+ >+sub printProperties { >+ my $h = shift(); >+ return qq[{${\(join', ',map"'$_': '$h->{$_}'",keys%$h)}}] >+} > > my $connection = new cqpid_perl::Connection($url, $connectionOptions); > >@@ -63,7 +69,8 @@ > my $i = 0; > > while($receiver->fetch($message, $timeout)) { >- print "Message(properties=" . $message->getProperties() . ",content='"; >+ my $redelivered = ($message->getRedelivered) ? "redelivered=True, " : ""; >+ print "Message(" . $redelivered . "properties=" . printProperties($message->getProperties()) . ", content='"; > if ($message->getContentType() eq "amqp/map") { > my $content = cqpid_perl::decodeMap($message); > map{ print "\n$_ => $content->{$_}"; } keys %{$content};
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 878940
:
649277
|
649278
|
652226