mirror of
https://github.com/internetarchive/brozzler.git
synced 2025-02-23 16:19:49 -05:00
make drain-queue output actual json instead of python dict syntax
This commit is contained in:
parent
fe1d9e01eb
commit
2ab767eaa9
@ -31,7 +31,10 @@ logging.basicConfig(stream=sys.stderr, level=args.log_level,
|
||||
format='%(asctime)s %(process)d %(levelname)s %(threadName)s %(name)s.%(funcName)s(%(filename)s:%(lineno)d) %(message)s')
|
||||
|
||||
def print_and_maybe_ack(body, message):
|
||||
print(body)
|
||||
# do this instead of print(body) so that output syntax is json, not python
|
||||
# dict (they are similar but not identical)
|
||||
print(message.body.decode('utf-8'))
|
||||
|
||||
if not args.no_ack:
|
||||
message.ack()
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user